/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Igor A. Pyankov
*/
package org.apache.harmony.x.print.cups;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Vector;
import javax.print.DocFlavor;
import javax.print.MultiDocPrintService;
import javax.print.PrintException;
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
import javax.print.attribute.AttributeSet;
import org.apache.harmony.x.print.DefaultPrintService;
import org.apache.harmony.x.print.ipp.IppAttribute;
import org.apache.harmony.x.print.ipp.IppAttributeGroup;
import org.apache.harmony.x.print.ipp.IppClient;
import org.apache.harmony.x.print.ipp.IppOperation;
import org.apache.harmony.x.print.ipp.IppPrinter;
import org.apache.harmony.x.print.ipp.IppRequest;
import org.apache.harmony.x.print.ipp.IppResponse;
/*
* The class extends PrintServiceLookup and is intended for
* looking up CUPS/IPP printers
*
* 1. The class allways looks printers on http://localhost:631
* This URL is default URL for default installation of CUPS server
* 2. The class accepts two properties:
* print.cups.servers - a list of CUPS servers
* print.ipp.printers - a list of IPP printers
* (note, that CUPS printer is IPP printer too)
*/
public class CUPSPrintServiceProvider extends PrintServiceLookup {
private static String cupsdefault = "http://localhost:631";
private static ArrayList services = new ArrayList();
/*
* 0 - no
* 1 - more
* 2 - more and more
* ...
*/
private static int verbose = 0;
static {
String verbose_property = (String) AccessController
.doPrivileged(new PrivilegedAction() {
public Object run() {
return System.getProperty("print.cups.verbose");
}
});
if (verbose_property != null) {
try {
Integer v = new Integer(verbose_property);
setVerbose(v.intValue());
} catch (NumberFormatException e) {
setVerbose(0);
}
}
}
public CUPSPrintServiceProvider() {
super();
}
/*
* The method returns array of URLs of CUPS servers
*/
private static String[] getCUPSServersByProperty() {
ArrayList cupslist = new ArrayList();
cupslist.add(cupsdefault);
String cupspath = (String) AccessController
.doPrivileged(new PrivilegedAction() {
public Object run() {
return System.getProperty("print.cups.servers");
}
});
String pathsep = ",";
if (cupspath != null && !cupspath.equals("")) {
String[] cupss = cupspath.split(pathsep);
for (int i = 0, ii = cupss.length; i < ii; i++) {
if (!cupss[i].equals("")) {
try {
URI cupsuri = new URI(cupss[i]);
cupslist.add(cupsuri.toString());
} catch (URISyntaxException e) {
if (verbose > 0) {
System.err.println("CUPS url: " + cupss[i]);
e.printStackTrace();
} else {
// IGNORE bad URI exception
}
}
}
}
}
return (String[]) cupslist.toArray(new String[0]);
}
/*
* The method returns array of URLs of IPP printers
*/
private static String[] getIppPrintersByProperty() {
ArrayList ipplist = new ArrayList();
String ipppath = (String) AccessController
.doPrivileged(new PrivilegedAction() {
public Object run() {
return System.getProperty("print.ipp.printers");
}
});
String pathsep = ","; //System.getProperty("path.separator");
if (ipppath != null && !ipppath.equals("")) {
String[] ipps = ipppath.split(pathsep);
for (int i = 0, ii = ipps.length; i < ii; i++) {
if (!ipps[i].equals("")) {
try {
URI cupsuri = new URI(ipps[i]);
ipplist.add(cupsuri.toString());
} catch (URISyntaxException e) {
if (verbose > 0) {
System.err.println("IPP url: " + ipps[i]);
e.printStackTrace();
} else {
// IGNORE bad URI exception
}
}
}
}
}
return (String[]) ipplist.toArray(new String[0]);
}
/*
* @see javax.print.PrintServiceLookup#getDefaultPrintService()
*/
public PrintService getDefaultPrintService() {
synchronized (this) {
String defaultService = findDefaultPrintService();
if (defaultService != null) {
PrintService service = getServiceStored(defaultService,
services);
if (service != null) {
return service;
}
CUPSClient client;
try {
client = new CUPSClient(defaultService);
service = new DefaultPrintService(defaultService, client);
services.add(service);
return service;
} catch (PrintException e) {
// just ignore
e.printStackTrace();
}
}
if (services.size() == 0) {
getPrintServices();
}
if (services.size() > 0) {
return (PrintService) services.get(0);
}
}
return null;
}
/*
* @see javax.print.PrintServiceLookup#getPrintServices()
*/
public PrintService[] getPrintServices() {
synchronized (this) {
String[] serviceNames = findPrintServices();
if (serviceNames == null || serviceNames.length == 0) {
services.clear();
return new PrintService[0];
}
ArrayList newServices = new ArrayList();
for (int i = 0; i < serviceNames.length; i++) {
PrintService service = getServiceStored(serviceNames[i],
services);
if (service != null) {
newServices.add(service);
} else if (getServiceStored(serviceNames[i], newServices) == null) {
try {
CUPSClient client = new CUPSClient(serviceNames[i]);
service = new DefaultPrintService(serviceNames[i],
client);
newServices.add(service);
} catch (PrintException e) {
// just ignore
e.printStackTrace();
}
}
}
services.clear();
services = newServices;
return (services.size() == 0) ? new PrintService[0]
: (PrintService[]) services.toArray(new PrintService[0]);
}
}
/*
* find printers on particular CUPS server
*/
private PrintService[] getCUPSPrintServices(String cups) {
synchronized (this) {
// just update static field 'services'
findPrintServices();
// next find services on server 'cups'
String[] serviceNames = (String[]) findCUPSPrintServices(cups)
.toArray(new String[0]);
if (serviceNames == null || serviceNames.length == 0) {
return new PrintService[0];
}
// return only those are stored in field 'services'
ArrayList newServices = new ArrayList();
for (int i = 0; i < serviceNames.length; i++) {
PrintService service = getServiceStored(serviceNames[i],
services);
if (service != null) {
newServices.add(service);
}
}
return (newServices.size() == 0) ? new PrintService[0]
: (PrintService[]) services.toArray(new PrintService[0]);
}
}
/*
* find printers on localhost only
*/
public PrintService[] getPrintServicesOnLocalHost() {
return getCUPSPrintServices(cupsdefault);
}
/*
* find service which name is same as serviceName
*/
private PrintService getServiceStored(String serviceName,
ArrayList servicesList) {
for (int i = 0; i < servicesList.size(); i++) {
PrintService service = (PrintService) servicesList.get(i);
if (service.getName().equals(serviceName)) {
return service;
}
}
return null;
}
/*
* @see javax.print.PrintServiceLookup#getPrintServices(javax.print.DocFlavor
* , javax.print.attribute.AttributeSet)
*/
public PrintService[] getPrintServices(DocFlavor flavor,
AttributeSet attributes) {
PrintService[] cupsservices = getPrintServices();
if (flavor == null && attributes == null) {
return cupsservices;
}
ArrayList requestedServices = new ArrayList();
for (int i = 0; i < cupsservices.length; i++) {
try {
AttributeSet unsupportedSet = cupsservices[i]
.getUnsupportedAttributes(flavor, attributes);
if (unsupportedSet == null) {
requestedServices.add(cupsservices[i]);
}
} catch (IllegalArgumentException iae) {
// DocFlavor not supported by service, skiping.
}
}
return (requestedServices.size() == 0) ? new PrintService[0]
: (PrintService[]) requestedServices
.toArray(new PrintService[0]);
}
/*
* @see javax.print.PrintServiceLookup#getMultiDocPrintServices(javax.print.DocFlavor[]
* , javax.print.attribute.AttributeSet)
*/
public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors,
AttributeSet attributes) {
// No multidoc print services available, yet.
return new MultiDocPrintService[0];
}
/*
* find all printers
*/
private static String[] findPrintServices() {
ArrayList ippservices = new ArrayList();
/*
* First, find on localhost and servers from print.cups.servers property
* and add them to full list
*/
String[] cupses = CUPSPrintServiceProvider.getCUPSServersByProperty();
for (int j = 0; j < cupses.length; j++) {
ippservices.addAll(findCUPSPrintServices(cupses[j]));
}
/*
* Then, check URLs from print.ipp.printers property and
* if is valid ipp printer add them to full list
*/
String[] ippp = CUPSPrintServiceProvider.getIppPrintersByProperty();
for (int j = 0; j < ippp.length; j++) {
try {
URI ippuri = new URI(ippp[j]);
IppPrinter printer = new IppPrinter(ippuri);
IppResponse response;
response = printer.requestPrinterAttributes(
"printer-uri-supported", null);
Vector gg = response
.getGroupVector(IppAttributeGroup.TAG_GET_PRINTER_ATTRIBUTES);
if (gg != null) {
for (int i = 0, ii = gg.size(); i < ii; i++) {
IppAttributeGroup g = (IppAttributeGroup) gg.get(i);
int ai = g.findAttribute("printer-uri-supported");
if (ai >= 0) {
IppAttribute a = (IppAttribute) g.get(ai);
Vector v = a.getValue();
if (v.size() > 0) {
ippservices.add(new String((byte[]) v.get(0)));
}
}
}
}
} catch (Exception e) {
if (verbose > 0) {
System.err.println("IPP url: " + ippp[j]);
e.printStackTrace();
} else {
// IGNORE - connection refused due to no server, etc.
}
}
}
// return array of printers
return (String[]) ippservices.toArray(new String[0]);
}
/*
* find ipp printers on CUPS server 'cups'
*/
public static ArrayList findCUPSPrintServices(String cups) {
ArrayList ippservices = new ArrayList();
URI cupsuri = null;
IppClient c = null;
IppRequest request;
IppResponse response;
IppAttributeGroup agroup;
Vector va = new Vector();
request = new IppRequest(1, 1, IppOperation.TAG_CUPS_GET_PRINTERS,
"utf-8", "en-us");
agroup = request.getGroup(IppAttributeGroup.TAG_OPERATION_ATTRIBUTES);
va.add("printer-uri-supported".getBytes());
agroup.add(new IppAttribute(IppAttribute.TAG_KEYWORD,
"requested-attributes", va));
try {
cupsuri = new URI(cups);
c = new IppClient(cupsuri);
response = c.request(request.getBytes());
Vector gg = response
.getGroupVector(IppAttributeGroup.TAG_GET_PRINTER_ATTRIBUTES);
if (gg != null) {
for (int i = 0, ii = gg.size(); i < ii; i++) {
IppAttributeGroup g = (IppAttributeGroup) gg.get(i);
int ai = g.findAttribute("printer-uri-supported");
if (ai >= 0) {
IppAttribute a = (IppAttribute) g.get(ai);
Vector v = a.getValue();
if (v.size() > 0) {
ippservices.add(new String((byte[]) v.get(0)));
}
}
}
}
} catch (Exception e) {
if (verbose > 0) {
System.err.println("CUPS url: " + cups);
System.err.println("CUPS uri: " + cupsuri);
System.err.println("Ipp client: " + c);
System.err.println(request.toString());
e.printStackTrace();
} else {
// IGNORE - connection refused due to no server, etc.
}
}
return ippservices;
}
/*
* find default printer
* At first, try to find default printer on CUPS servers and return first found
* If failed, return first found IPP printer
* If failed return null
*/
private static String findDefaultPrintService() {
String serviceName = null;
String[] cupses = CUPSPrintServiceProvider.getCUPSServersByProperty();
for (int i = 0; i < cupses.length; i++) {
try {
URI cupsuri = new URI(cupses[i]);
IppClient c = new IppClient(cupsuri);
IppRequest request;
IppResponse response;
IppAttributeGroup agroup;
Vector va = new Vector();
request = new IppRequest(1, 1,
IppOperation.TAG_CUPS_GET_DEFAULT, "utf-8", "en-us");
agroup = request
.getGroup(IppAttributeGroup.TAG_OPERATION_ATTRIBUTES);
va.add("printer-uri-supported".getBytes());
agroup.add(new IppAttribute(IppAttribute.TAG_KEYWORD,
"requested-attributes", va));
response = c.request(request.getBytes());
IppAttributeGroup g = response
.getGroup(IppAttributeGroup.TAG_GET_PRINTER_ATTRIBUTES);
if (g != null) {
int ai = g.findAttribute("printer-uri-supported");
if (ai >= 0) {
IppAttribute a = (IppAttribute) g.get(ai);
Vector v = a.getValue();
if (v.size() > 0) {
serviceName = new String((byte[]) v.get(0));
break;
}
}
}
} catch (URISyntaxException e) {
//e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (Exception e) {
//e.printStackTrace();
}
}
if (serviceName != null && !serviceName.equals("")) {
return serviceName;
}
String[] ippp = CUPSPrintServiceProvider.getIppPrintersByProperty();
for (int i = 0; i < ippp.length; i++) {
try {
URI ippuri = new URI(ippp[i]);
IppClient c = new IppClient(ippuri);
IppRequest request;
IppResponse response;
IppAttributeGroup agroup;
Vector va = new Vector();
request = new IppRequest(1, 1,
IppOperation.GET_PRINTER_ATTRIBUTES, "utf-8", "en-us");
agroup = request
.getGroup(IppAttributeGroup.TAG_OPERATION_ATTRIBUTES);
va.add("printer-uri-supported".getBytes());
agroup.add(new IppAttribute(IppAttribute.TAG_KEYWORD,
"requested-attributes", va));
response = c.request(request.getBytes());
IppAttributeGroup g = response
.getGroup(IppAttributeGroup.TAG_GET_PRINTER_ATTRIBUTES);
if (g != null) {
int ai = g.findAttribute("printer-uri-supported");
if (ai >= 0) {
IppAttribute a = (IppAttribute) g.get(ai);
Vector v = a.getValue();
if (v.size() > 0) {
serviceName = new String((byte[]) v.get(0));
break;
}
}
}
} catch (URISyntaxException e) {
//e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (Exception e) {
//e.printStackTrace();
}
}
return serviceName;
}
public static int isVerbose() {
return verbose;
}
public static void setVerbose(int newverbose) {
CUPSPrintServiceProvider.verbose = newverbose;
CUPSClient.setVerbose(newverbose);
}
}
分享到:
相关推荐
vue3 访问通义千问聊天代码例子
基于Python的Flask-vue基于Hadoop的智慧校园数据共享平台实现源码-演示视频 项目关键技术 开发工具:Pycharm 编程语言: python 数据库: MySQL5.7+ 后端技术:Flask 前端技术:HTML 关键技术:HTML、MYSQL、Python 数据库工具:Navicat、SQLyog
【实验1】:读取一次AI0通道数值 【实验2】:一次读取AI0通道多个数值 【实验3】:单次模拟量输出 【实验4】:连续模拟量输出(输出一个正弦曲线)
无人船的Smith-PID跟踪控制方法研究及实现:融合传统与最优PID策略的LOS曲线跟踪资料,基于无人船Smith-PID改进跟踪控制技术及其LOS曲线跟踪方法研究资料,基于无人船的smith-pid跟踪控制资料。 首先,针对pid进行了改进,有传统pid,最优pid和基于smith的pid三种控制方式。 然后还在smithpid基础上设计了LOS的曲线跟踪方法。 (有对应参考文献)。 有意者可直接联系,参考学习资料。 python语言。 ,基于无人船的Smith-PID跟踪控制; PID改进(传统PID、最优PID、基于Smith的PID); Smith-PID曲线跟踪方法; 参考学习资料; Python语言。,基于无人船的Smith-PID优化跟踪控制资料
自研船舶电力推进系统MATLAB仿真报告:从柴油机+同步发电机到异步电机直接转矩控制的全面模拟与实践,《船舶电力推进系统自搭MATLAB仿真报告:从柴油机同步发电机到异步电机直接转矩控制的完整过程与参数配置详解》,自己搭建的船舶电力推进系统(船舶电力推进自动控制)完全自搭MATLAB仿真,可适度,含对应27页正文的中文报告,稀缺资源,仿真包括船舶电站,变流系统和异步电机直接转矩控制,放心用吧。 三个文件逐层递进 柴油机+同步发电机(船舶电站) 柴油机+同步发电机+不控整流全桥逆变 柴油机+同步发电机+变流模块+异步电机直接转矩控制 所有参数都是配好的,最大负载参考变流系统所带负载两倍,再大柴油机和同步发电机参数就不匹配了,有能力可以自己调 ,核心关键词:船舶电力推进系统; MATLAB仿真; 船舶电站; 变流系统; 异步电机直接转矩控制; 柴油机; 同步发电机; 不控整流全桥逆变; 参数配比。,《船舶电力推进系统MATLAB仿真报告》
西门子博图WinCC V15自动化系统项目实战:多服务器客户端下的PID DCS闭环控制及参数调整实战指南,西门子博图WinCC V15自动化系统项目实战:多服务器客户端下的PID DCS闭环控制及参数调整实战指南,西门子博图WinCC V 15大型自动化系统项目,包含多台服务器客户端项目,系统采用安全1516F -3PN DP 外挂多台精智面板,1200PLC ET200SP 变频器 对整个工艺过程PID DCS 闭环过程控制,如何调整温度压力流量液位等参数,实用工程项目案例 ,西门子博图WinCC V 15; 大型自动化系统; 多台服务器客户端; 安全外挂; 精智面板; 1200PLC ET200SP; 变频器; PID DCS; 闭环过程控制; 温度压力流量液位调整; 工程项目案例,西门子博图WinCC V15大型项目:多服务器客户端的PID DCS闭环控制与实用参数调整
内容概要:本文详尽介绍了计算机网络相关资源及其各方面构成要素,首先阐述了硬件层面的各种传输媒介和设备如双绞线、同轴电缆、光纤以及台式电脑、笔记本、大型计算机等设备,还包括网络互联所需的各类组件如网卡、交换机、路由器等。其次探讨了多种操作系统的特性和主要功能,以及各类通讯和支持应用程序的概述,涵盖浏览器、图像和视频编辑等常用软件。再深入讨论了多种常见网络协议如TCP、UDP、HTTP等的功能特性。最后还提到了确保网络安全运行的重要措施和工具如MIB、SNMP以及防火墙、入侵检测系统等。并且简要提到计算机网络在不同的应用环境,从局域网到移动网络。 适合人群:所有对计算机网络技术感兴趣的初学者和希望深入了解各个组成成分的技术人员. 使用场景及目标:为用户提供计算机网络资源全面而系统的认识,帮助他们建立对于该领域的理论和技术的扎实认知基础,提高在实际环境中识别配置及维护计算机网络系统的能力.
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
ABAQUS中隧道结构模型的无限元应用:超声激励源的施加方法、3D无限元吸收边界的添加技巧、模型结果精确性校核流程及教学视频与CAE、INP文件解析,ABAQUS隧道模型中3D无限元吸收边界的应用:超声激励源的施加与模型结果精确性校核的实践教程,ABAQUS无限元吸收边界,abaqus隧道无限元,1.超声激励源施加;2.3D无限元吸收边界添加方法;3.模型结果精确性校核;4.提供教学视频,cae、inp文件。 ,ABAQUS无限元吸收边界;ABAQUS隧道无限元;超声激励源施加;3D无限元吸收边界添加;模型结果精确性校核;CAE和INP文件。,ABAQUS中超声激励下无限元吸收边界设置及模型精度验证教程
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
git自用lllllllllllllllllll
本资源与文章【Django小白项目】为一体,此为已成功项目,供给给Django初学者做参考,有不会的问题可以私信我噢~
使用一维数据表示向量和二维矩阵,支持常用运算。
1、以上文章可用于参考,请勿直接抄袭,学习、当作参考文献可以,主张借鉴学习 2、资源本身不含 对应项目代码,如需完整项目源码,请私信博主获取
基于多目标粒子群优化算法(MOPSO)的微电网多目标经济运行分析与优化策略考虑响应侧响应的协同调度策略,基于多目标粒子群优化算法(MOPSO)的微电网经济调度优化:含风光储荷一体化模型与需求侧响应策略,考虑需求侧响应的微电网多目标经济运行 建立了含风光储荷的微电网模型,以发电侧成本(包括风光储以及电网的购电成本)和负荷侧成本最小为目标,考虑功率平衡以及储能SOC约束,建立了多目标优化模型,通过分时电价引导负荷需求侧响应,得到可削减负荷量,同时求解模型,得到风光储以及电网的运行计划。 这段代码是一个使用多目标粒子群优化算法(MOPSO)解决问题的程序。下面我将对程序进行详细的分析和解释。 首先,程序的目标是通过优化算法来解决一个多目标优化问题。程序中使用的优化算法是多目标粒子群优化算法(MOPSO),该算法通过迭代更新粒子的位置和速度来搜索最优解。 程序的主要功能是对能源系统进行优化调度,包括光伏发电、风力发电、储能和电网供电。程序的目标是最小化能源系统的成本,并满足负荷需求。 程序的主要思路是使用粒子群优化算法来搜索最优解。程序中定义了一个粒子类(Particle),每个粒子代
data.gov.sg geojson部分项目整理
基于MATLAB Simulink的避障功能欠驱动无人船航迹跟踪控制仿真实验研究,基于MATLAB Simulink的欠驱动无人船避障功能路径跟踪控制仿真实验研究,包含避障功能的欠驱动无人船航迹(路径)跟踪控制仿真实验,基于MATLAB Simulink制作 ,避障功能; 欠驱动无人船; 航迹(路径)跟踪控制; MATLAB Simulink 仿真实验; 避障算法。,基于MATLAB Simulink的避障无人船航迹跟踪控制仿真实验
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作
海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作