https://kr.mathworks.com/matlabcentral/answers/questions. MATLAB的答案——새질문 2021-10-21T19:12:35Z 标签:kr.mathworks.com,2005:问题/ 1568918 2021-10-21T15:19:00Z 2021-10-21T19:12:35Z 从表显示中删除报价 试图在表中显示一个符号矩阵,但是使用table或array2table直接显示会导致符号矩阵显示为:clc;numVars = input('你想要输入多少个关节');DH =符号(0 (numVars, 4));DHparameters =[“a”;“α”;“d”;“θ”);我=字符串(1:numVars);j = 1: numVars clc; disp("JOINT "+num2str(j)+" of "+num2str(numVars)); pR = input('Is this joint prismatic or revolute (p/r): ','s'); DH(j,1) = sym(input("Enter DH parameter a for joint " + num2str(j)+": ")); DH(j,2) = sym(input('Enter DH parameter alpha: ')); if pR=='p' DH(j,4) = sym(input('Enter DH parameter theta: ')); DH(j,3) = sym("d_"+num2str(j),'real'); else DH(j,3) = sym(input('Enter DH parameter d: ')); DH(j,4) = sym("theta_"+num2str(j),'real'); end end clc; table1 = array2table(DH, 'RowNames',i,'VariableNames',{'a', 'alpha', 'd', 'theta'}); %table1 = table(i,string(DH),'VariableNames',{'i', 'a alpha d theta'}); disp(table1); If there is a different way to display this to the user I am open to that as well! 康纳勒克莱尔 https://kr.mathworks.com/matlabcentral/profile/authors/10907368 标签:kr.mathworks.com, 2005:问题/ 1569063 2021 - 10 - 21 - t19:07:50z 2021 - 10 - 21 - t19:07:50z 无法使用IP地址的仪器建立TCPIP连接: MATLAB无法连接频谱分析仪后,从Windows 7升级到Windows 10。其他的一切都没有改变或修改。具体错误信息为:tcpErrorStr = TCPIP connection was unable to be established with instrument at IP address: 192.168.1.20 err = MException with properties: identifier: 'MATLAB:UndefinedFunction'| message: 'Undefined function ' TCPIP ' for input argument…"[3x1 struct] IP地址已被验证,其他具有Windows 7的系统可以连接。该脚本位于共享驱动器上,所以它不是特定于一个系统,排除了MATLAB中Win 7和Win 10系统之间的差异。认为这个问题可能与MATLAB 2014A不兼容win10有关,所以安装了MATLAB 2018B,收到了相同的错误消息。 詹姆斯·鲁伊斯 https://kr.mathworks.com/matlabcentral/profile/authors/23978396 标签:kr.mathworks.com, 2005:问题/ 1568853 2021 - 10 - 21 - t13:42:59z 2021-10-21T19:06:20z 如何交换2行的单元格数组? 我有一个3x2的单元格数组我需要交换第2行和第3行。我怎样才能解决这个简单的问题?有没有什么函数我不知道? Pietro Fedrizzi https://kr.mathworks.com/matlabcentral/profile/authors/21901552 标签:kr.mathworks.com, 2005:问题/ 1569023 2021 - 10 - 21 - t18:01:51z 2021 - 10 - 21 - t19:03:27z 基于名称对嵌套结构进行排序 嗨所有,我有一个代码,导入满满数据文件的文件夹,并根据文件类型组织/处理它们。正如目前所做的那样,数据被组织成具有多个包含测量数据的子结构的结构。我需要按名称排序的数据行,但尚未找到一种方法来进行排序的子结构。目前,数据看起来像导入时这样如果有帮助,我正在使用R2018B。 史密斯 https://kr.mathworks.com/matlabcentral/profile/authors/22948853 标签:kr.mathworks.com, 2005:问题/ 1569048 2021 - 10 - 21 - t18:28:16z 2021 - 10 - 21 - t19:01:37z 请给我回答什么是错的 < < / matlabcentral /答案/ uploaded_files / 774708 / d45728bb b1e9 - 4621 aaa4 - 29 efa0fa14db.jpeg > > 현국조 https://kr.mathworks.com/matlabcentral/profile/authors/23661206 标签:kr.mathworks.com, 2005:问题/ 1568938 2021 - 10 - 21 - t15:45:59z 2021 - 10 - 21 - t19:00:45z Fwrite ASCII输出错误 大家好,当使用fwrite()将数据以二进制格式写入文件时,在某些情况下我得到十六进制输出,在某些情况下我得到ASCII输出。显示错误的示例代码如下;% data arrays dataArr1 = [-1 1];dataArr2 = [-1 -1];%打开文件fid1 = fopen('test1.dat', 'w');fopen = fopen('test2.dat', 'w');将数据写入文件fwrite(fid1, dataArr1, 'int16');写入文件(fid2、dataArr2 int16);%关闭文件fclose(fid1);文件关闭(fid2); In this case test1.dat shows the expected output of 'ffff 0100' whereas test2.dat results in 'ÿÿÿÿ' rather than the expected 'ffff ffff'. Any ideas why it outputs hex in one instance but ASCII in the other? Thanks in advance! *EDIT - I'm checking the values by opening the files in basic editor (Sublime) 乔治豪威尔 https://kr.mathworks.com/matlabcentral/profile/authors/21433668 标签:kr.mathworks.com,2005:问题/ 1569003 2021 - 10 - 21 - t17:01:26z 2021 - 10 - 21 - t18:59:37z 表达包括无限参数的多项式 大家好,我知道表达式p=[1 -4 2]对应于p(x) = x^2 - 4x + 2。我想表达p(x) = a*x^2 - 4x + 2-a如果你能告诉我怎么做我会很感激的。最好,Cagdas Cagas Akalin https://kr.mathworks.com/matlabcentral/profile/authors/5238124 标签:kr.mathworks.com, 2005:问题/ 1567138 2021-10-19T14:15:08z 2021 - 10 - 21 - t18:58:38z 如何摆脱依赖于之前迭代的循环 我有一个旧的C ++程序,我想翻译成Matlab。它有一个循环,其中每次迭代都取决于先前迭代中的决定。我有很多数据,所以需要很长时间。有没有办法使用矩阵操作而不是循环执行此操作?这是代码:data = rand(1,105);对于k = 100:-1:6低级度=平均值(数据(k-5:k-1));upperaverage =平均值(数据(k + 1:k + 5));环绕着=平均值([较低的血小录]);如果数据(k)> SurvertingAverage数据(k)= Upperaverage结束结束预先感谢。 喷气推进实验室 https://kr.mathworks.com/matlabcentral/profile/authors/876061 标签:kr.mathworks.com, 2005:问题/ 1566643 2021 - 10 - 18 - t18:36:24z 2021 - 10 - 21 - t18:55:53z 无法使用Mingw编译器为C ++ 嗨,我想运行这个例子文件在我的电脑上(https://de.mathworks.com/help/coder/ug/generate-cpp-classes-for-matlab-classes-that-model-simple-and-damped-oscillators.html) Matlab 2021 b,我得到以下错误消息即使我安装了MinGW C / c++编译器。我试图解决这个问题,但没有成功。请帮助我。 Gagan Dabole谈话 https://kr.mathworks.com/matlabcentral/profile/authors/24355744 标签:kr.mathworks.com, 2005:问题/ 1467991 2021 - 10 - 06 - t12:44:25z 2021 - 10 - 21 - t18:51:17z GUI元素更新应用程序设计师中的更新策略 大家好,这里是Matlab的长期用户,但是用App Designer构建我的第一个GUI应用。我正在为更新uicontrol的策略而努力。在本教程的示例中,uicontrol会在需要的时候随时更新。然而,这些都是非常简单的例子。在我的GUI中,我有紧密交互的UIcontrol,例如在另一个UIcontrol的有效/无效输入的情况下禁用/启用元素,更新值,更新状态条,等等,这比基本的例子更复杂。如果我像这些示例中那样进行UIcontrol更新(主要是在回调中),那么将会重复许多代码,并且我将会放松监督并易于维护。所以我现在做的是每当我需要一个更新的UIcontrol:设置一个布尔值为每个UIcontrol(如app.StatusCode = true),可能需要一个更新运行回调之后调用一个函数app.updateUIcontrols()的最后运行函数函数EditFieldCalculateValueChangedFcn(应用程序、事件)val = event.Value;if val > 0 app.StatusCodeValue = '好';else app.StatusCodeValue = '错误';end app.StatusCode = true; % set boolean value of other UIcontrols to update app.updateUIcontrols(); end The function updateUIcontrols() checks all UIcontrols and performs an update if needed. function updateUIcontrols(app) ... if app.StatusCode = true app.EditFieldStatusCode.Value = app.StatusCodeValue; app.StatusCode = false; end ... end This has also some drawbacks A lot of extra variables are needed (a boolean and eventually a value variable for each UIcontrol) A lot of unnecessary checking (if I have 50 UIcontrols and only need 1 to be update, it will still check the others too) The UIcontrols are updated sequentially so I must make sure that an update of one UIcontrol does not influence the state of an UIcontrol checked earlier The UIcontrols are only updated at discrete timepoints, not necessarily immediately Fill in yourself ;-) Are there any strategies to tackle this problem? Are there examples of good GUI coding practices in Matlab? Pieter https://kr.mathworks.com/matlabcentral/profile/authors/1014845 标签:kr.mathworks.com, 2005:问题/ 1569058 2021 - 10 - 21 - t18:51:17z 2021 - 10 - 21 - t18:51:17z 用matlab求解矩阵 通过输入一个命令创建以下矩阵。不要显式地键入单个元素。[0 0 0 0 0;0 0 1 10 20;0 0 2 8 26;0 0 3 6 32] Shvan卡扎菲 https://kr.mathworks.com/matlabcentral/profile/authors/24428555 标签:kr.mathworks.com, 2005:问题/ 1568988 2021-10-21T16:46:07Z 2021 - 10 - 21 - t18:40:11z 如果条件为真,如何保存数组中的值 我有两个单元阵列“x”和“y”。我需要检查x == 1中的值是否为值,然后保存相应的y值。如何在一个循环中做到这一点(我有很多x和y) Tejashree帕瓦尔 https://kr.mathworks.com/matlabcentral/profile/authors/23881659 标签:kr.mathworks.com, 2005:问题/ 556024 2020 - 06 - 28 - t10:27:32z 2021 - 10 - 21 - t18:36:12z 是什么让你对MATLAB感到沮丧?#2 类似于愿望清单线程发生的内容(#1#2#3#4#4#5),“对Matlab的挫败感”的线程变得非常大。这使得导航困难并增加页面加载时间。所以这是后续页面。你应该在哪里发表什么?愿望列表线程(#1#2#3#4#5):MATLAB答案的错误和功能请求粉碎线程(#1#2):关于MATLAB本身的使用和功能的遗漏丢失功能线程(#1#2):功能当你的最后一个变得太大时(如果您没有编辑特权,请发布评论,要求某人进行编辑) rik. https://kr.mathworks.com/matlabcentral/profile/authors/3073010 标签:kr.mathworks.com,2005:问题/ 1569053 2021 - 10 - 21 - t18:34:11z 2021 - 10 - 21 - t18:34:11z 按钮显示由来自Mouseclick的点制成的多边形区域 我想要这个按钮打印这个多边形的区域,由点从鼠标点击,但我得到'错误而评估UIControl回调'。maxPoints = 20;xLimits = [0 100];yLimits = [0 100];图xlim(xLimits) ylim(yLimits) hold on mousePointCoords = 0 (maxPoints,2);数= 0;for k = 1:maxPoints coords = ginput(1); / /If isempty(corows) break end count = count + 1;mousePointCoords(计数:)=坐标;情节(坐标(:1)坐标(:,2),b。,' MarkerSize ', 8); end mousePointCoords = mousePointCoords(1:count,:); disp(mousePointCoords(:,1)); disp(mousePointCoords(:,2)); pgon = polyshape(mousePointCoords(:,1),mousePointCoords(:,2)); plot(pgon) c = uicontrol('Style','pushbutton','String','Area','CallBack', @PushB); function PushB(src,event) disp(area(pgon)); end 艾哈迈德·马利克 https://kr.mathworks.com/matlabcentral/profile/authors/24409239 标签:kr.mathworks.com, 2005:问题/ 1568903 2021 - 10 - 21 - t14:59:42z 2021 - 10 - 21 - t18:32:26z 使用复制文件时出错,无法写入目标 真的希望有人能帮上忙。Matlab(版本2021b)似乎无法写入目标文件夹。当使用copyfile命令时,在我的命令窗口中得到以下错误:error using copyfile Cannot write to destination: c:\ users \…使用'f'选项覆盖。当然,这些点(…)表示Matlab试图写入的实际文件夹。如果有人能帮我改正这个错误就太好了。提前谢谢! Jelle克莱默 https://kr.mathworks.com/matlabcentral/profile/authors/4567596 标签:kr.mathworks.com, 2005:问题/ 1567813 2021 - 10 - 20 - t09:06:17z 2021 - 10 - 21 - t18:30:25z 在另一个不同大小的矩阵中求相等的(lon,lat) 我有2个矩阵:=经度,纬度,压力,温度B =经度,纬度,深度尺寸大于B我试图合并数据,B获得:(经度、纬度、压力、深度、温度)我的逻辑是:确定值条= latB和洛娜,lonB出口两列:我面临的问题是,我想把(lon, lat)作为一个单一的列,这样的值不会分裂(?)像一行,并给出两个矩阵的不同大小,我想告诉matlab比较一个元素(Alat1)与B-lat列中的所有元素,我发现我可以使用像这样的东西:latMatch = ismember(A(:,2), B(:,2));latlonMatch = lonMatch & latMatch;%当然这3行可以放入1 Final matrix = A(latlonMatch, 3:end);我是初次接触这类问题,不知道该如何处理:( 杰拉尔丁·玛丽亚·帕拉西奥斯·托雷斯 https://kr.mathworks.com/matlabcentral/profile/authors/16698134 标签:kr.mathworks.com,2005:问题/ 1568958 2021-10-21T16:01:25Z 2021-10-21T18:27:57Z 没有函数Max的最大向量找到 在没有max函数的情况下我很难在向量中找到最大值,我知道我可以用max但是没有这个?通常是B = max(X),我不知道如何求极限,因为我用的是X(I +1)我找不到更多不在这个向量里的数。X =[0 1 1 2 3 3 3 5]我的坏的解决方案怎么开始?for i = 1:length(X) - 1 if X(i) < X(i+1) else X(i) > X(length(X+1)) end end 米歇尔Plechac https://kr.mathworks.com/matlabcentral/profile/authors/23978820 标签:kr.mathworks.com, 2005:问题/ 1568863 2021 - 10 - 21 - t13:50:13z 2021 - 10 - 21 - t18:26:53z 将单元格数组转换为方程 大家好!我有一个简单的问题,我已经寻找一个适合我的问题的答案在社区但还没找到工作,所以我去:我正在读readtable . csv文件的功能和效果非常好,但是有一列是一个给出这样写:19 * 32例如在每一个细胞。我想要的是用Matlab为数组的每个单元格计算这个方程,只得到一个数字。例如,对于上面的方程,它是608。Matlab读这个专栏作为一个细胞阵列,我已经尝试了cell2mat函数,但不幸的是,这没有帮助我....我附加了一个文件,其中有我想要解决的列的示例。感谢您的帮助,来自德国的问候 卢卡斯Schlosser https://kr.mathworks.com/matlabcentral/profile/authors/11460390 标签:kr.mathworks.com, 2005:问题/ 1566808 2021 - 10 - 19 - t04:32:19z 2021-10-21T18:25:58Z 我丢失了降噪示例中的测试信号“washington machine -16-8-mono-200secs.mp3”。 在“Scripts_DLSignalsAndSound.zip”的解压归档文件中,我丢失了文件“washingmachin16-8-mono -200secs.mp3”。我在哪里可以下载这个文件?谢谢你汤姆 汤姆Cipollone https://kr.mathworks.com/matlabcentral/profile/authors/10484391 标签:kr.mathworks.com, 2005:问题/ 466648 2019 - 06 - 12 - t04:00:00z 2021 - 10 - 21 - t18:24:35z 当编辑器意外关闭时,如何重新打开MATLAB脚本/函数? 当编辑器意外关闭时,如何重新打开MATLAB脚本/函数? MathWorks支金宝app持团队 https://kr.mathworks.com/matlabcentral/profile/authors/4622813 标签:kr.mathworks.com, 2005:问题/ 1569043 2021 - 10 - 21 - t18:20:50z 2021 - 10 - 21 - t18:23:19z 将所有2x2常用乘以3D矩阵 考虑一个由大小为m的N个方阵串联而成的3D矩阵T。有没有简单的方法将它们相乘(m1 x m2 x m3 x m4…x mN)变成一个尺寸为m的单一2D矩阵“total”?类似的;总= prod (T (:,:,:));在for循环中,它可能看起来像这样:total = eye(m);for i = 1;N = total*T(:,:,i);是否有可能在沿3D矩阵的某一点上停止乘法,即点1 < h < N;我还应该提到,在我的具体应用中,矩阵是变量和数字的符号。 康纳勒克莱尔 https://kr.mathworks.com/matlabcentral/profile/authors/10907368 标签:kr.mathworks.com,2005:问题/ 1566983 2021 - 10 - 19 - t10:32:52z 2021 - 10 - 21 - t18:16:37z 在GraphPlot上绘制饼图 您好,我想在作为GraphPlot对象绘制的图的节点上绘制饼图,以便饼图的中间恰好位于节点。因此,我想这样做s = [1 1 1 1 2 2 3 4 4 5 6];T = [2 3 4 5 3 6 6 5 7 7 7];图G = (s, t);p =情节(G);然后添加一个轴,并在其中一个节点上绘制一个饼图('Position',[?, ?, pie_size, pie_size]);X = [1 0.5 2.5 2];pie_chart = pie(X, repmat({"},size(X)));的吗?表示图形图中新图形的坐标。 While I can read out the coordinates of the nodes in the graph plot from p.XData and p.YData, these seem to be relative to the center of the plot in units which are incompatible to any available unit system in the axes function. Does anyone know of a way to accomplish what I want (possibly also in a different way)? Woda https://kr.mathworks.com/matlabcentral/profile/authors/3467276 标签:kr.mathworks.com, 2005:问题/ 1568978 2021 - 10 - 21 - t16:36:04z 2021 - 10 - 21 - t18:13:51z 将3个2D图形组合成一个3D图形 你好,我有一些三维速度数据,希望能够把三块与X轴上的时间和速度在Y轴上成一个图不使用次要情节功能——就像下面的图,在我的实例,Z轴将包含三个标签,分别为X, Y和Z分量的三维速度数据。我已经能够做出单独的图表,但我很难将它们组合成如下图所示的一个图表。任何帮助都将不胜感激!谢谢! 爱德华Keavney https://kr.mathworks.com/matlabcentral/profile/authors/20516289 标签:kr.mathworks.com, 2005:问题/ 1569028 2021 - 10 - 21 - t18:02:56z 2021-10-21T18:13:13Z 请给我密码 < < / matlabcentral /答案/ uploaded_files 774668/51403C29-5F75-44B8-A741-1D4D9B8EC738.jpeg > > 현국조 https://kr.mathworks.com/matlabcentral/profile/authors/23661206 标签:kr.mathworks.com, 2005:问题/ 1569038 2021 - 10 - 21 - t18:09:23z 2021 - 10 - 21 - t18:09:23z Arduino MKR 1010的Bootloader端口,在Simulink中也没有检测金宝app 你好,我正在使用arduino MKR 1010板使用simulink的Encoder Block读取我的电机速度。金宝app当我连接我的MKR板到计算机,首先我们需要给Com端口munbers i simulink硬件设置。金宝app但是,我的笔记本电脑设备管理器只显示一个com端口号。未显示引导程序端口号。当我随意奔跑时。在你的硬件板部署过程中发生了以下错误:couldn ' t find the bootloader COM port for your Arduino MKR WiFi 1010 board。这可能是由于未连接的板或无法识别的端口。如果板连接到您的主机,然后尝试把板在Bootloader模式,以获得Bootloader COM端口号。请让我知道如何解决这金宝app个问题。任何帮助都将不胜感激。 Thanks! aakash dewangan https://kr.mathworks.com/matlabcentral/profile/authors/21731573 标签:kr.mathworks.com, 2005:问题/ 1569033 2021 - 06 - 22 - t04:00:00z 2021 - 10 - 21 - t18:08:18z 我如何使用模拟数据检查器(SDI)保存和共享在模拟期间记录的所有信号的子集? 我使用模拟数据检查器分析大量数据。一旦我找到一个感兴趣的地区,我想为所有与同事一起分享所有信号的数据(不是整个仿真时间范围),以便他们可以继续分析。与只是在感兴趣的时间范围内共享数据,完整的数据集非常大,并将缓慢保存和分享。如何使用模拟数据检查器执行此操作? MathWorks支金宝app持团队 https://kr.mathworks.com/matlabcentral/profile/authors/4622813 标签:kr.mathworks.com, 2005:问题/ 526597 2020 - 05 - 19 - t12:55:17z 2021 - 10 - 21 - t18:06:47z 写一个函数max_sum,以v为行向量和n(一个正整数)作为输入。这个函数需要找到v中n个连续的元素,它们的和是最大的。它返回n个连续整数的第一个元素的求和和索引。 %Example-[sum,index]=max_sum([1 2 3 4 5 4 3 2 1],3) % sum =13 % index=4 function [sum,index]=max_sum(v,n) total=v(1,1);如果n > v总结= 0;指数= 1;Else for ii=1:length(v) jj=ii+(n-1);如果jj < =长度(v);总=(总金额(v (ii): v (jj)));结束(总结、索引)= max(总);结束结束 vidushi Chaudhary https://kr.mathworks.com/matlabcentral/profile/authors/18413210 标签:kr.mathworks.com, 2005:问题/ 1568878 2021 - 10 - 21 - t14:15:45z 2021 - 10 - 21 - t18:03:54z 如何使一个函数运行只有青少年变量在matlab 亲爱的大家,我有一个有四个变量的函数。我希望这个函数只运行整数变量。我想为每个变量定义一个界限,让它在这些范围内运行,以找到最佳答案。我不知道如何将变量限定为整数而不是其他值。例如:Function (A)= optim(B,C,D,E) B=1:1:10: C=1:1:10: D=2:2:10: E=73:1:77:注意,我将在遗传算法工具箱中运行这个。在这里我必须确定每个参数的上下限。但我的问题是,它将运行在上下界之间的所有可能值。我只希望它们是整数。我该怎么做呢?我将感激你在这件事上的支持金宝app Reza Shahzadi. https://kr.mathworks.com/matlabcentral/profile/authors/23696666 标签:kr.mathworks.com, 2005:问题/ 1568578 2021 - 10 - 21 - t08:34:16z 2021 - 10 - 21 - t17:57:06z 如何演奏音符 嗨,为什么我不能玩这个?FS = 8192;dt = 1 / fs;l = 1;l = l * fs;t =(0:1:l-1)* dt-0.5;notefreq1 = 261.63;notefreq2 = 659.26;notefreq3 = 440;夹念= 0.25; NoteSpace =0.1; Note=abs(t)<=((NoteDuration/2).*cos(2*pi*NoteFreq1*t)+((NoteDuration/2)+ NoteSpace).*cos(2*pi*NoteFreq2*t)+((NoteDuration/2)- NoteSpace).*cos(2*pi*NoteFreq3*t)); 汤姆•科恩 https://kr.mathworks.com/matlabcentral/profile/authors/24318721 标签:kr.mathworks.com, 2005:问题/ 1568993 2021 - 10 - 21 - t16:48:18z 2021 - 10 - 21 - t17:52:00z timetable_平均每个月的值 从2000年到2020年,每个月(1 - 12月)的平均值。我希望有12个USDM_Index值;21年来每个月都有一张 Leulaye Maskal https://kr.mathworks.com/matlabcentral/profile/authors/19360574 标签:kr.mathworks.com, 2005:问题/ 1568933 2021 - 10 - 21 - t15:37:52z 2021-10-21T17:51:05Z 我如何检查两个文件是否在编程上不同? 给定两个相同类型的文件(例如.m、.xlsx、.fig),我想比较它们,以检查它们是否相同。我如何能编程调用Matlab的比较功能,并让它返回比较的状态?这里的用例是,我有一个开发文件夹和一个发布文件夹。我想检查开发文件与发布版本相比是否有变化,这样我就知道是否需要更新。 莫妮卡Jaskolka https://kr.mathworks.com/matlabcentral/profile/authors/4417791 标签:kr.mathworks.com,2005:问题/ 593833 2020 - 09 - 15 - t06:44:27z 2021-10-21T17:47:20z 快速重启Parsim()返回不同的结果 我正在使用parsim()运行多个模拟,并使用快速重启来加速执行。然而,我注意到使用parsim()和快速重启产生的结果与sim()和parsim()不使用快速重启产生的结果不同。我附加了一个简单的模型,只包含SimEvents块和运行它的代码。该模型有一个名为InterGenerationTime的变量,由Entity Generator块的Period字段使用。SimulationInput对象用于为不同的实验设置InterGenerationTime。To Workspace块记录了该块生成的实体数量。运行代码后,得到如下图。前两行是预期的,但第三行(parsim()与快速重启)不是。我猜我的实现出了问题。任何帮助都将不胜感激。 Abdolkarim穆罕默 https://kr.mathworks.com/matlabcentral/profile/authors/14675656 标签:kr.mathworks.com, 2005:问题/ 1564616 2021-10-15T14:04:14Z 2021 - 10 - 21 - t17:37:43z 尝试删除以前的数据/行从下一个按钮使用matlab Gui 大家好,我有一个小问题。我能够使用应用程序设计师编写一个“下一步按钮”,目标是画线。我有来自excel的数据。我可以通过点击下一个按钮来画每一条线。唯一的问题是之前的数据/行没有被删除。所以不是一行,我将有2或更多取决于我点击next按钮的次数。为了更详细地说明,您可以查看所附的文档。我希望只有一个LINE/BAND的Next按钮代码是在uiconfirm(app。UIFigure,“你确定吗?”、“确认关闭”,……“CloseFcn”,@ (src、事件)mycallback(应用程序、src、事件));App.exp_counter = App.exp_counter + 1; v_or_h = app.v_or_h_array(app.exp_counter); app.v_thick1 = app.v_thickness_1(app.exp_counter); app.v_thick2 = app.v_thickness_2(app.exp_counter); app.h_thick1 = app.h_thickness_1(app.exp_counter); app.h_thick2 = app.h_thickness_2(app.exp_counter); %Vertical line if v_or_h == 0 app.region1 = patch(app.UIAxes, ... [app.v_thick1 app.v_thick2 app.v_thick2 app.v_thick1], ... [-10 -10 10 10],'r', ... 'FaceAlpha',1,... 'LineWidth',0.01, ... 'LineStyle','-','tag','region1'); %Horizontal line elseif v_or_h == 1 app.region1 = patch(app.UIAxes,[-10 10 10 -10], ... [app.h_thick1 app.h_thick1 app.h_thick2 app.h_thick2], ... 'r','FaceAlpha',1,... 'LineWidth',0.01, ... 'LineStyle','-','tag','region1'); end 弗兰克paulin Ludovig pehn Mayo https://kr.mathworks.com/matlabcentral/profile/authors/22347008 标签:kr.mathworks.com, 2005:问题/ 1569013 2021-10-21T17:13:51Z 2021-10-21T17:13:51Z MATLAB上的三维图形与Mathematica上的不一致 我试图用matlab绘制3-D剧情。我惊讶的是,结果与Mathematica的结果不同。这是MATLAB代码:清除CLC C = 3 * 10 ^ 8;l = 0.07;EP0 = 8.854 * 10 ^ -12;hbar = 1 * 10 ^ -34;mu13 = 2.06 * 10 ^ -29;mu32 = 2.06 * 10 ^ -29;mu24 = 2 * 10 ^ -29;mu14 = 2 * 10 ^ -29; OD = 46.6; GAMA41 = 18840000; GAMA31 = 0.5*18840000; GAMA11 = 0.02*GAMA41; GAMA21 = 0.04*GAMA41; GAMA22 = 0.02*GAMA41; GAMA24 = GAMA41; DELTA1 = 130*GAMA41; DELTA3 = -3*GAMA41; DELTA2 = 3*GAMA41; OMEGA2 = 15*GAMA41; OMEGA3 = 15*GAMA41; landa13 = 795*10^-9; landa23 = 795*10^-9; landa14 = 780*10^-9; landa24 = 780*10^-9; omega24 = 2*pi /landa24; omega14 = 2*pi /landa14; omega13 = 2*pi /landa13; omega23 = 2*pi /landa23; omega1 = omega13 - DELTA1; omega2 = omega24 - DELTA2; omega3 = omega24 - DELTA3; omegaS1 = omega23 - DELTA1; omegaS2 = omega24 - DELTA2; omegaS3 = omega14 - DELTA3; k1 = omega1/c; k2 = omega2/c; k3 = omega3/c; mRb = 85.467*1.6606*10^-27; kB = 1.380649*10^-23; T = 353.15; N = 1.2*10^17; x1 = (2*N*mu13*mu24*mu32*mu14^3); x2 = (ep0*hbar^5); x3 = (abs(OMEGA2))^2; x4 = (abs(OMEGA3))^2; [delta2,delta3] = meshgrid(-1e9:1e6:1e9); Z = abs(x1./(x2*((GAMA31 + 1i*DELTA1).*((GAMA21 + 1i*delta2 + 1i*delta3).*(GAMA41 + 1i*delta3 + 1i*DELTA2) + x3).*((GAMA11 + 1i*delta3).*(GAMA41 + 1i*delta3 + 1i*DELTA3) + x4)))); mesh(delta2,delta3,Z) Here I have compared the result (blue) with that of Mathematica. From experiment, I know that I should have four peaks. Do I need to improve my code? Add something? Saeid Vashahri Ghamsari https://kr.mathworks.com/matlabcentral/profile/authors/8744393 标签:kr.mathworks.com, 2005:问题/ 1568893 2021 - 10 - 21 - t14:48:04z 2021-10-21T17:13:23Z 从圆到多边形 大家好,如果我有一个圆(x-a)^2 +(x-b)^2 = r^2,有任何matlab函数可以把这个圆转换成多边形吗?由于默罕默德 默罕默德·苏莱曼 https://kr.mathworks.com/matlabcentral/profile/authors/18239230 标签:kr.mathworks.com, 2005:问题/ 549972 2019 - 10 - 25 - t04:00:00z 2021 - 10 - 21 - t17:08:23z MathWorks是否支持MA金宝appTLAB的Docker图像?如何创建一个安装了MATLAB的Docker图像? 我想创建一个安装了MATLAB的Docker图像。我该怎么做呢?有什么官方文件告诉我怎么做吗? MathWorks支金宝app持团队 https://kr.mathworks.com/matlabcentral/profile/authors/4622813 标签:kr.mathworks.com,2005:问题/ 1567273 2021 - 10 - 19 - t16:51:01z 2021 - 10 - 21 - t17:08:16z 如何产生不同起始和结束时间的连续时域信号? 我在尝试产生8个不同频率的信号。每个信号都有相同的总时间周期。每个信号在不同的时间开始。第二个信号在第一个信号结束时开始,以此类推。我想在循环中做这样我就不用为所有8个信号写重复的指令了。那么我该怎么做呢? Omkar瓦兹 https://kr.mathworks.com/matlabcentral/profile/authors/13707106 标签:kr.mathworks.com, 2005:问题/ 714253 2021 - 01 - 11 t05:00:00z 2021 - 10 - 21 - t17:03:43z 如何使用MATLAB从PDF中提取图像? 我想用MATLAB从一个本机PDF文件中提取嵌入式图像。我该怎么做呢? MathWorks支金宝app持团队 https://kr.mathworks.com/matlabcentral/profile/authors/4622813 标签:kr.mathworks.com, 2005:问题/ 1567148 2021 - 10 - 19 - t14:32:32z 2021 - 10 - 21 - t16:58:34z 解非线性方程组最快的方法是什么? 大家好,我的问题是这样的:我有一个矩形区域,划分成1000x100 (MxN)节点,其中M和N分别是y和x方向上的总节点。在沿x方向(N=1到100)的每个节点上,我得到一个由1000个代数方程组成的非线性系统,我使用函数fsolve来解它。所以对于一个实验点,总共有100个方程组,每个方程组有1000个方程。这导致一个实验点的模拟时间大约为15分钟。问题是,我的最终目标是使用lsqnonlin估计我的耦合PDE问题中的一个参数,通过拟合总共75个实验点的解决方案。由于知道对这些实验点进行一次模拟大约需要19个小时,因此拟合过程将需要更多的时间。我的问题是,除了fsolve,还有别的函数可以用吗?或者有没有一种数值方法可以最小化拟合时间? 哈姆扎卡里姆 https://kr.mathwands.com/matlabcentral/profile/authors/21651986 标签:kr.mathworks.com, 2005:问题/ 1568898 2021 - 10 - 21 - t14:58:01z 2021 - 10 - 21 - t16:56:52z 如何从3x2单元格从函数“查找”中获取某个值? 我需要一个特定的变量a等于1 2或3根据之前的两个选择“Firstselection”和“Secondselection”算法从1到3。我有一个3x2 cell Comb = [1,2;2、3;1、3)。我必须分配”“找到函数,因此当Firstselection = 1 & Secondselection = 2(反之亦然),一个= 1,Firstselection = 2 & Secondselection = 3(反之亦然),a = 2和Firstselection = 1 & Secondselection = 3(反之亦然),= 3,所有基于细胞梳子。我已经用一个if循环解决了它,但现在我需要应用函数find到单元格,根据我的2个选择获得一个确定的值“a”。我不能改变细胞。 Pietro Fedrizzi https://kr.mathworks.com/matlabcentral/profile/authors/21901552 标签:kr.mathworks.com, 2005:问题/ 1568998 2021-10-21T16:49:02z 2021-10-21T16:49:02z Lratiotest警告关于对数似然值 我试图比较ARIMA模型使用lratiotest函数。运行下面的代码,当调用lratiotest时,我得到以下错误消息:ipc_ea_2009 = ipc_ea (fin_index:长度(ipc_ea));%得到没有危机累积滞后的相关时期= 0 (5);log_likelihoods = 0 (5);For p = 1:5 For q = 1:5 lag (p,q) = p+q;mod = arima('Constant',0,' arlag ',p,'D',1, 'MALags',q, 'Distribution', '高斯');[健康,~,fit_ll] =估计(mod, ipc_ea_2009,“显示”,“关闭”);log_likelihoods (p, q) = fit_ll;End End lag =重塑(lag,25,1); log_likelihoods = reshape(log_likelihoods,25,1); % starting out with the unrestricted arima(5,1,5) model_u = log_likelihoods(25); model_r = log_likelihoods(1:24); df = lags(25)-lags(1:24); [H,pValue,Stat,CriticalValue] = lratiotest(model_u, model_r, df, 0.05); The variable log_likelihoods contains: -340.485668054773 -334.522914100928 -342.907508852972 -342.956015065684 -343.000412390143 -333.972859848341 -335.223009974139 -334.368894183728 -335.234865940324 -334.734053408058 -344.545740375831 -335.386800606845 -344.831558645563 -345.044215158301 -344.795009838202 -345.097563048760 -335.128973733821 -345.086019494768 -345.443870064777 -346.253404467528 -345.168693904948 -335.934650953789 -344.909840797136 -346.255587823234 -345.916640381693 How can I fix this warning? 凯伦Qvist拉森 https://kr.mathworks.com/matlabcentral/profile/authors/24392845 标签:kr.mathworks.com, 2005:问题/ 1568983 2021 - 10 - 21 - t16:43:44z 2021 - 10 - 21 - t16:43:44z 在将新的输入数据(测试数据)传递给训练有素的回归神经网络模型之前,是否需要“手动”标准化? 大家好,我使用Matlab中的回归学习者应用程序培训了神经网络模型,我将“标准化”设置为true。根据文档,该选项标准化预测因子,使它们具有平均值0和标准偏差1.现在我想用之前从未看到的新数据测试此模型,我想知道我是否需要应用在将其传递给培训的模型之前,使用n = ranalize(a)函数(a)函数(a)函数,以预测输出,或者每次接收到任何输入时自动执行。在文档中我找不到任何关于它的任何东西,所以对这个话题的任何帮助都会得到很大欣赏:) Sara Cecilia Abecia Hernanz https://kr.mathworks.com/matlabcentral/profile/authors/20136509 标签:kr.mathworks.com, 2005:问题/ 1561596 2021-10-11t20:48:37z 2021 - 10 - 21 - t16:40:47z 未识别的函数或变量'detectSIFTFeatures' 你好朋友。我使用matlab 2021a,但当我使用下面的命令:points = detectSIFTFeatures(I);显示如下错误:未识别的函数或变量'detectSIFTFeatures' 玛丽 https://kr.mathworks.com/matlabcentral/profile/authors/19166565 标签:kr.mathworks.com, 2005:问题/ 1568973 2021 - 10 - 21 - t16:28:44z 2021 - 10 - 21 - t16:28:44z matlab github集成在2021a“不正确的用户名和密码” 我正在跟踪这个MATLAB Youtube视频,关于如何在Github https://www.youtube.com/watch?v=O7A27uMduo0上使用MATLAB源代码控制。我首先创建了一个私有github存储库,它的https是https://github.com/myUser/repName.git。然后我创建了一个空文件夹,在MATLAB中,我右键单击空文件夹目录,选择“源代码控制>管理文件”,复制上面的https存储库地址在“存储库路径”下。MATLAB然后要求我填写我的github用户名和密码,我使用相同的人,我在我的web浏览器访问我的github。然而,MATLAB坚持我正在使用和错误的用户名和密码,即使他们是正确的。同样,我遵循的过程与上面链接的MATLAB视频中完全相同。我没有配置任何SSH。我应该在遵循视频中的步骤之前做这个吗?谢谢你! dleal https://kr.mathworks.com/matlabcentral/profile/authors/20719788 标签:kr.mathworks.com, 2005:问题/ 1568968 2021-10-21T16:14:53z 2021-10-21T16:14:53z 不能开始仿真软件金宝app 我似乎有一个simulink的问题。金宝app我曾经能够在一个项目中完美地工作。昨天我醒来,每当我试图打开我的项目时,一条消息说“无法重新加载”c:\ program files \ matlab \ r2018b \ bin \ win64 \ libmwsimulink.dll'“会弹出。金宝app我在网上检查,有人留下了新鲜的恢复,所以我做到了。我第一次重新安装时,没有任何事情发生,但我忘了清洁%appdata%。第二次恢复是魅力,我能够回到该项目上的工作。我休息一下,当我试图打开它时,弹出同样的错误。有任何想法吗?谢谢! 此Salcedo Ferraggine https://kr.mathworks.com/matlabcentral/profile/authors/8366697 标签:kr.mathworks.com, 2005:问题/ 1561926 2021-10-12T09:01:32Z 2021 - 10 - 21 - t16:13:50z 访问在线课程中的错误 为什么我不能访问在线自定进度课程?它显示了一个错误。可能是什么原因呢? Kirtankumar dobariya. https://kr.mathworks.com/matlabcentral/profile/authors/23819481 标签:kr.mathworks.com, 2005:问题/ 1568963 2021 - 10 - 21 - t16:03:59z 2021 - 10 - 21 - t16:11:26z ODE89和ODE78在Matlab 2021A中无法识别 为什么我不能运行ode89和ode78在MATLAB 2021a?我如何检查什么ode函数安装在我的matlab?.我一直得到以下错误:无法识别的函数或变量'ode78'。 ISMAEL https://kr.mathworks.com/matlabcentral/profile/authors/5942580 标签:kr.mathworks.com, 2005:问题/ 48717 2012-09-21T08:28:52Z 2021 - 10 - 21 - t16:10:43z 创建一段音乐使用matlab?? 给定名为“tonea.m”的注释文件------注意a -----清除所有fs = 8000; ts = 1 / fs; t = [0:ts:1]; f_a = 440;%注释A的频率是440 Hz A = SIN(2 * PI * F_A * T);声音(A,FS);音符B,C#,D,E和F#的频率为493.88Hz,554.37 Hz,587.33 Hz,分别为659.26Hz和739.99 Hz。如何编写MATLAB文件以在以下顺序中使用笔记产生一段音乐:A,A,E,E,F#,F#,E,E,D,D,C#,C#,b,b,a,a。将每个音符的持续时间分配为0.3s。 通频带调制 https://kr.mathworks.com/matlabcentral/profile/authors/2835480 标签:kr.mathworks.com, 2005:问题/ 154272 2014 - 09 - 10 - t13:48:18z 2021 - 10 - 21 - t16:09:50z 在情节标题中输入一个变量 我浏览了这些论坛,发现了大量关于输入变量作为标题的内容,然而,它们都不适合我。我试图改变一个图形的标题与一个参数,用户将输入在功能。首先我把一个字符串例如str = sprintf (% d的只是一个例子,不是工作的,变量)标题(str)然而只有仅仅的一个例子是打印出图的标题,一切,包括变量消失后,这当我移动变量在标题。干杯! 卢克 https://kr.mathwands.com/matlabcentral/profile/authors/5616002 标签:kr.mathworks.com, 2005:问题/ 59886 2013-01-25T14:49:53z 2021 - 10 - 21 - t16:08:28z 保存在屏幕上看到的图形? 我想保存一个图png格式完全一样,在屏幕上看到。我搜索网页,发现:set(gcf,'PaperPositionMode','auto');saveas (gcf[文件名' . png]);这本来是想让图的尺寸保持不变,但实际上它把尺寸从1200x600改成了1875x938,对吧?我还试着设置了“PaperPosition”,得到了相同的尺寸1200x600,但保存的图形的字体比屏幕上大得多,遮住了图形的部分。如果我在图形窗口中使用“保存”按钮,那么它就可以保存在屏幕上看到的图形,没有问题,但如果可能的话,我希望能够通过编程来做到这一点。请帮助。谢谢! C https://kr.mathworks.com/matlabcentral/profile/authors/65209