https://ch.mathworks.com/matlabcentral/answers/questions MATLAB的答案——新问题 2021 - 10 - 22 - t22:13:50z 标签:ch.mathworks.com, 2005:问题/ 427305 2018 - 10 - 31 - t23:46:24z 2021 - 10 - 22 - t22:13:50z 连接Arduino Matlab 我有一个新的Macbook pro usbc港口,所以我必须使用USB适配器接上我的Arduino,我有一个代码,但它不能运行,因为它不能找到合适的港口,我该怎么办? 柯尔特帕里斯 https://ch.mathworks.com/matlabcentral/profile/authors/10772874 标签:ch.mathworks.com, 2005:问题/ 882648 2021 - 07 - 20 - t18:39:35z 2021 - 10 - 22 - t22:11:35z 有办法创造使用英特尔OneAPI fortran墨西哥人文件? 我有一些fortran代码,我需要变成墨西哥人项目文件。fotran编译器的问题是我对mac(英特尔OneAPI)不支持通过MATLAB和其他编译器支持诺特获得了自OneAPI取代智能工作室XE平行。万博1manbetx有办法编译和编译器创建墨西哥人职能之一使用OneAPi吗? Yafet Menjetta https://ch.mathworks.com/matlabcentral/profile/authors/19279610 标签:ch.mathworks.com, 2005:问题/ 1569808 2021 - 10 - 22 - t22:08:38z 2021 - 10 - 22 - t22:08:38z 如何使用lstm预测多时间步长预测层和“预测”? 水痘的例子lstm预测只接受一个输入数组。建议使用该函数的“预测”多输入数据。但是,通过使用“预测”,一个人怎么能循环预测多时间步长预测?“预测”是只用于预测一次性提前一步。我看到“closeloop”功能是用于此目的而不是与“预测”。我怎么能使用“closeloop”预测多时间步长与“预测”的一个例子。我的神经网络是lstm。谢谢。 Ismaeel https://ch.mathworks.com/matlabcentral/profile/authors/1344148 标签:ch.mathworks.com, 2005:问题/ 1569803 2021 - 10 - 22 - t22:02:42z 2021 - 10 - 22 - t22:02:42z 保存每一个分类指数中SSIM(亮度、对比度和结构) 你好,我比较两个dicom或nii数据使用分类指数中SSIM(亮度、对比度和结构)。我很感谢如果有人让我如何拯救每一个分类指数中(亮度、对比度和结构)SSIM seperatly。 Heesoon辛 https://ch.mathworks.com/matlabcentral/profile/authors/24115967 标签:ch.mathworks.com, 2005:问题/ 331437 2017 - 03 - 23 - t04:30:25z 2021 - 10 - 22 - t21:59:36z MATLAB需要很长时间我的笔记本电脑上运行相同的代码相比,我的桌面。 我很新的MATLAB。我需要为我的项目调整PID控制器使用微分进化算法。大约需要200秒的代码运行在我的桌面,100代。(2秒1 gen)相同的代码在我的笔记本电脑大约需要1000秒。(10秒1 gen)虽然很新。可能会出现什么问题?我买了这个笔记本电脑教育的目的很明显,我想要快速和快速。这是我的笔记本电脑和桌面的规范:桌面* 2 2100 @ 3.10 GHz Intel Core i3将军* 4 GB DDR3内存* 500 GB硬盘的笔记本* 7日将军英特尔酷睿i7 7500 u @ 2.70 GHz(基地)高达3.50 GHz * 12 GB RAM DDR4 * 256 GB作为PCIe M.2 NVME SSD我知道台式机比笔记本电脑同行快。但来吧,这是一个7日创酷睿i7对第二代酷睿i3,仍然失去了战斗。有什么可以减少运行时做了什么? Thanks in advance. Brathindara苏雷什 https://ch.mathworks.com/matlabcentral/profile/authors/10001379 标签:ch.mathworks.com, 2005:问题/ 1569558 2021 - 10 - 22 - t13:49:45z 2021 - 10 - 22 - t21:57:53z 在网络分支对应depthConcatenationLayer groupedConvolution2dLayer后需要 嗨,所有!我在网络并行处理使用groupedConvolution2dLayer 5图像碎片。所以,我用5组通道。我在网络有三个分支机构和我需要连接这些分支的输出。有depthConcatenationLayer为此在Matlab:但是我需要连接层以正确的顺序:第一组# 1渠道这三个分支,然后渠道组# 2的三个分支,…,最后的渠道组# 5的三个分支。如何去做?Matlab的depthConcatenationLayer不允许指定的通道。我试着创建一个自定义分组深度连接层:classdef myGroupedDepthConcatenationLayer < nnet.layer。一层一层属性GroupNumber结束方法函数= myGroupedDepthConcatenationLayer(组、numinputs名称)层。Name =名称;层。NumInputs = numinputs; layer.Description = 'Custom grouped depth concatenation layer'; layer.GroupNumber = groups; end function Z = predict(layer,varargin) X = varargin; c = zeros(1, layer.NumInputs); for i = 1:layer.NumInputs s = size(X{i}); c(i) = s(3); end s(3)=sum(c); Z = dlarray(zeros(s,'single')); ofset = 0; for j=1:layer.GroupNumber for i=1:layer.NumInputs len = c(i)/layer.GroupNumber; Z(:,:,ofset+1:ofset+len)=X{i}(:,:,(j-1)*len+1:j*len); ofset=ofset+len; end end end end end Is it correct? How will the channels reordering in the custom layer affect backward propagation duiring network training? How to distribute gradients between inputs correctly? “尼古拉Ponomarenko https://ch.mathworks.com/matlabcentral/profile/authors/17360679 标签:ch.mathworks.com, 2005:问题/ 1569793 2021 - 10 - 22 - t21:16:34z 2021 - 10 - 22 - t21:50:28z 我怎么拉从一个表,总意味着一项基于一个特定的条件(几个科目),然后计算平均值的差异? 我有一个大桌子的数据(在下面的例子)。对于每一个“主题”,我需要确定所有的总平均值”项目”,是“高”“Z”条件,和2)的总平均值”项为“是“低”“Z”条件。例如,问题1的答案是:25(即项目的意思为“高”“Z”项目);和50(即均值为一项“低”“Z”项目)然后我需要生成一个表,对于每一个“主题”,列出这两个值的差异如下:(“总平均值的”项目”,“高”在“Z”)(“所有的总平均值”项”,“低”“Z”条件)。非常感谢!主题项目条件Z再学习类1 30 Y 1 20 N B 1高45低N 1 55低B 2 17高Y 2 45低N B 2 13高56 Y 3 Y 3 12低N B 3 34低N B 3 15高N Monique查特顿 https://ch.mathworks.com/matlabcentral/profile/authors/16217049 标签:ch.mathworks.com, 2005:问题/ 1569748 2021 - 10 - 22 - t18:25:56z 2021 - 10 - 22 - t21:49:40z 关掉自动伸展的3 d图程序设计师 作为你的轨道3 d图,轴拉伸图空间填满。我试图修复轴所以他们不拉伸形状自动填充空间。这里有一些事情我尝试手动——改变长宽比,(1,1,1)在设计视图——使用这个剪的代码后所有的元素都已经被甘氨胆酸ax =;道具= {‘CameraViewAngle’,‘DataAspectRatio’,‘PlotBoxAspectRatio};集(ax,道具,获得(ax,道具));——使用这个代码剪断轴vis3d——利用这最后剪断代码pbaspect(应用程序。axes1(1 1 1)),这些事情会工作在一个正常的图而不是在应用程序设计师甚至文档说让autostretch PlotBoxAspectRatioMode手册应该禁用,但它没有。提前谢谢你。 米切尔李 https://ch.mathworks.com/matlabcentral/profile/authors/10981852 标签:ch.mathworks.com, 2005:问题/ 102588 2009 - 06 - 27 - t01:11:00z 2021 - 10 - 22 - t21:36:41z 我怎么改变网格线的间距在我的地图映射工具箱? 我使用PLOTM命令随后GRIDM命令生成一个网格地图上我。但是,我想改变网格线的间距,这样得到的纬度和经度线每隔2度。 MathWorks支万博1manbetx持团队 https://ch.mathworks.com/matlabcentral/profile/authors/4622813 标签:ch.mathworks.com, 2005:问题/ 1569718 2021 - 10 - 22 - t17:35:32z 2021 - 10 - 22 - t21:35:36z 帮助创建循环,将文本转换为数字 嗨,这是一个后续问题我昨天问。我有一个循环,要求用户输入句子直到输入‘结束’这个词。循环结束后,我想要显示的句子类型inegers,使用“字符”命令前char((101 102 103)),但逆转,因为它会把信件和将它们转换为整数。这是我迄今为止。另一个循环执行这个特定的函数可能是极其错误的但我绝对初学者,只是试图遵循类似的格式我第一循环昨天收到一些帮助。clc N =输入(' N是什么?:“)%建立N all_A = {};而真正=输入('给我一个句子!:',' s ');%要求用户输入句子如果strcmpi (strtrim (A),“结束”);打破; end %will end the loop if end is typed all_A{end+1} = A; end all_B={}; while false B= input('give me a sentence!: ','s'); if strcmpi(strtrim(B)); num2str(char[B]) end end 亚历克斯Skantz https://ch.mathworks.com/matlabcentral/profile/authors/23509763 标签:ch.mathworks.com, 2005:问题/ 1569798 2021 - 10 - 22 - t21:32:25z 2021 - 10 - 22 - t21:33:26z 如何比较两个simbiology方程模型? 我需要比较两种simbiology模式。有任何直接的方法来比较两个模型的方程?任何建议都是感激。谢谢BV BK V https://ch.mathworks.com/matlabcentral/profile/authors/22962297 标签:ch.mathworks.com, 2005:问题/ 1569783 2021 - 10 - 22 - t21:01:40z 2021 - 10 - 22 - t21:28:02z 避免重叠节点标签的图 是否有办法避免重叠节点标签的图,如写一些标签对角/写在图和周围的空白和箭头连接到相应的节点吗?当然,假设图有一个合理的节点数量。 金正日玛丽亚达米亚尼 https://ch.mathworks.com/matlabcentral/profile/authors/19505160 标签:ch.mathworks.com, 2005:问题/ 1569758 2021 - 10 - 22 - t19:19:23z 2021 - 10 - 22 - t21:25:49z 遗传算法绘图仪不显示 你好,我是使用ga优化器来找到一些参数。然而,bestfit情节并不出现。从帮助部分我用这段代码% %合适选项选择= optimoptions(“遗传算法”,“FunctionTolerance”, 1 e-9 MaxGenerations, 5000000,“MaxStallGenerations”, 500000年,‘HybridFcn’,‘patternsearch’,……PlotFcn, {@gaplotbestf, @gaplotchange},“PopulationSize”, 500年,“FitnessLimit”,负无穷,‘MigrationDirection’,‘都’);优化器% % %做ro磅= 0;0;0);乌兰巴托=[正;3.0;5.0); f=@(param_vec) e_and_r_vals(param_vec) [best_fit_param,fval,exitflag,output,population,scores] = ga(f,3,[],[],[],[],lb,ub,[],opts) Also the below does not show the plot %% Fit options opts=optimoptions('ga','FunctionTolerance', 1E-9,'MaxGenerations',5000000,'MaxStallGenerations',500000,'HybridFcn','patternsearch', ... 'PlotFcn','@gaplotbestf','PopulationSize',500,'FitnessLimit',-inf,'MigrationDirection','both'); %% Optimizer % Do a ro lb = [ 0 ; 0 ; 0 ]; ub = [ Inf ; 3.0 ; 5.0 ]; f=@(param_vec) e_and_r_vals(param_vec) [best_fit_param,fval,exitflag,output,population,scores] = ga(f,3,[],[],[],[],lb,ub,[],opts) 哈立德·默罕默德 https://ch.mathworks.com/matlabcentral/profile/authors/17248143 标签:ch.mathworks.com, 2005:问题/ 429543 2018 - 11 - 13 - t08:09:59z 2021 - 10 - 22 - t21:16:54z 警告:矩阵接近奇异或严重了。结果可能是不准确的。RCOND = 2.202823 e-18。 你好人我需要一个帮助我用LDA但当我运行我得到消息提到的S1 = x (d1);S2 = x (d2);S3 = x (d3);% %在类散射矩阵Sw = S1 + S2 + S3;% %海尔集团之间的散射矩阵SB1 = n1。* (mu1-mu) * (mu1-mu) ';SB2 = n2。* (mu2-mu) * (mu2-mu) ';SB3 = n3。* (mu3-mu) * (mu3-mu) ';某人= SB1 + SB2 + SB3; %% Computing the LDA projection W=inv(Sw)*SB; %% getting the projection vectors [V,D]=eig(W); 鲁伊Mauaie https://ch.mathworks.com/matlabcentral/profile/authors/13481095 标签:ch.mathworks.com, 2005:问题/ 1569788 2021 - 10 - 22 - t21:14:29z 2021 - 10 - 22 - t21:14:29z 突出图像中的一个特定部分 我想问如何阅读,然后区分如果从另一个图片里面是这张照片也包括在内。根据附上的图片,我想,例如,插入图片1,然后识别和定义模型的基于图像包含模型的一部分,我将包括它。目的是突出区域图像的粗糙和光滑。知道原样品的图片将每次不同,和系统必须区分区域由于相同的图像部分。我希望我能够传达的想法,我希望找到一个答案。谢谢 玛利亚姆的拉姆兹 https://ch.mathworks.com/matlabcentral/profile/authors/22292624 标签:ch.mathworks.com, 2005:问题/ 1569363 2021 - 10 - 22 - t08:47:49z 2021 - 10 - 22 - t21:10:41z 显示一个条形图的共同传奇 你好,我想为条形图显示一个共享的传奇。我已经尝试了一些东西,但他们没有成功。有人能帮忙吗?我真的很感激你的支持。万博1manbetx请找到下面的代码。谢谢P_g1 (1:) = (7.8269 5.8145 0.5642 + 0.0030 - 0.1352);:P_g1 (2) = (7.8612 5.7935 0.5371 + 0.0024 - 0.2280);:P_g1 (3) = (7.8815 5.7321 0.5095 + 0.0020 - 0.3433);:P_g1 (4) = (7.8750 5.6529 0.4718 + 0.0017 - 0.4496);:P_g2 (1) = (7.8034 5.7474 0.3709 + 0.0019 - 0.3708); P_g2(2,:) = [7.8572 5.9635 0.4167+0.0015 0.1771]; P_g2(3,:) = [7.8758 6.0315 0.4243+0.0013 0.1223]; P_g2(4,:) = [7.7865 6.0026 0.4204+0.0012 0.1422]; sl = [240:20:300]; %% figure t = tiledlayout('flow','TileSpacing','compact'); nexttile b = bar(sl,P_g1,0.9); set(b, {'DisplayName'}, {'Accepted power','Absorbed power','Losses','Radiating power'}') ax=gca; ax.TickLabelInterpreter = 'latex'; axis tight ylim([0 8]) grid on ylabel('Power (W)','Interpreter','Latex') xlabel('Shield length (mm)','Interpreter','Latex') title('$\gamma_1$','Interpreter','Latex') %h = legend('Location','eastoutside'); %set(h,'Interpreter','Latex') set(gcf,'Color','w') set(findall(gcf,'-property','FontName'),'fontsize',18) nexttile b = bar(sl,P_g2,0.9); set(b, {'DisplayName'}, {'Accepted power','Absorbed power','Losses','Radiating power'}') ax=gca; ax.TickLabelInterpreter = 'latex'; axis tight ylim([0 8]) grid on ylabel('Power (W)','Interpreter','Latex') xlabel('Shield length (mm)','Interpreter','Latex') title('$\gamma_2$','Interpreter','Latex') %h = legend('Location','eastoutside'); %set(h,'Interpreter','Latex') set(gcf,'Color','w') set(findall(gcf,'-property','FontName'),'fontsize',18) nexttile set(b, {'DisplayName'}, {'Accepted power','Absorbed power','Losses','Radiating power'}') h = legend; h.Layout.Tile = 'east'; 山楚 https://ch.mathworks.com/matlabcentral/profile/authors/20873218 标签:ch.mathworks.com, 2005:问题/ 1569448 2021 - 10 - 22 - t10:40:48z 2021 - 10 - 22 - t21:04:55z 科迪地区安全 我已经解决了一些问题在科迪,他为什么不增加我的点或允许我赚徽章? Mariola卡马乔的谎言 https://ch.mathworks.com/matlabcentral/profile/authors/24436067 标签:ch.mathworks.com, 2005:问题/ 460530 2019 - 05 - 06 - t15:04:54z 2021 - 10 - 22 - t20:51:31z LSTM时间序列预测与3输入使用水痘的例子 请让我知道如何应用3输入时间序列预测使用LSTM下面的例子。水痘示例链接:https://kr.mathworks.com/help/deeplearning/examples/time-series-forecasting-using-deep-learning.html?lang = en在本例中,输入是一个(numFeatures = 1;)和我的改变多个输入的代码。我不确定数据输入结构,和下面的代码。那将是感激提供的例子或解释。谢谢你! jeonga ryu https://ch.mathworks.com/matlabcentral/profile/authors/9845679 标签:ch.mathworks.com, 2005:问题/ 1569078 2021 - 10 - 21 - t19:22:13z 2021 - 10 - 22 - t20:50:17z 定义一个函数向量的值,同时保持两个变量未知 我已经创建了一个在matlab函数依赖于三个变量,说:f = @ (x, y, z) f (x, y, z)我有一个向量的值x,我们叫它答:我的目标是估计功能:我正在寻找一个matlab命令将允许我计算f (x, y, z)为每个值的向量,然后和他们在一起。这里有几件事我有试过失败:% # 1:尝试返回g作为一个数字(0),而不是一个函数。g = @ (y, z)和(f (A, y, z)) %尝试# 2:返回g作为一个数字(0),而不是作为一个函数。g = @ (y, z) cumsum (f (A, y, z)) %尝试# 3:不能识别作为输入。函数g = g (y, z) g = f (A, y, z)结束我有检查,问题在于估计f (A, y, z),立即将所有值为0。我知道的一个可能的替代方法是做手工的总和(a_1, y, z) + f (, y, z)等,但也有175种不同的数字矢量这一手动将永远和编码。有人有其他的想法吗? 劳拉Freitas https://ch.mathworks.com/matlabcentral/profile/authors/20836197 标签:ch.mathworks.com, 2005:问题/ 1569768 2021 - 10 - 22 - t19:35:09z 2021 - 10 - 22 - t20:29:02z 累计金额与条件 我想做累积求和条件的列3/4 coulmn 5/6。例子:例如-0.0700 + 0比-0.9800 + (-0.9800 + 0.4950)+ (-0.9800 + 0.4950 + 0.1680)+ .....所以比它应该开始总结3到0.2070:3.3590 + (3.3590 + 1.7470)+ ..... 拉维·库马尔 https://ch.mathworks.com/matlabcentral/profile/authors/23624242 标签:ch.mathworks.com, 2005:问题/ 1569773 2021 - 10 - 22 - t20:11:08z 2021 - 10 - 22 - t20:26:30z 转换nifti文件包含一个大脑区域感兴趣的一个逻辑向量(数量的种子(在本例中1)x数量的像素点? 你好,我想把nifti文件包含一个感兴趣的区域(例如尾状,标记为1,其余的大脑0)逻辑向量,os种子数量(在本例中只有1)x种子体素的数量?谢谢你!艾米丽 艾米丽Belleau https://ch.mathworks.com/matlabcentral/profile/authors/9000064 标签:ch.mathworks.com, 2005:问题/ 346948 2017 - 06 - 30 - t15:11:51z 2021 - 10 - 22 - t20:22:52z 如何改变模拟运行时常量的值 你好,我想换一个常数的价值模型,但我得到以下错误:“不能改变参数“价值”的“untitled /常数”,而模万博1manbetx拟运行。块是虚拟仿真是优化”有人请帮我在这方面 Samah EL QASSAH https://ch.mathworks.com/matlabcentral/profile/authors/7829682 标签:ch.mathworks.com, 2005:问题/ 308911 2016 - 10 - 24 - t04:00:00z 2021 - 10 - 22 - t20:15:57z 我可以在Ubuntu在Windows上安装MATLAB在Bash中? Windows 10周年更新(Windows 1607)构建一个选项来安装一个Bash shell基于最小Ubuntu 14.04环境。我可以安装MATLAB在这样的环境下吗? MathWorks支万博1manbetx持团队 https://ch.mathworks.com/matlabcentral/profile/authors/4622813 标签:ch.mathworks.com, 2005:问题/ 1569153 2021 - 10 - 21 - t23:37:06z 2021 - 10 - 22 - t19:51:27z 有另一个eval结构? 嗨,我知道eval是邪恶的,但在这种特殊情况下,我找不到其他方法一样,所以我想问你如果有人提出了一个更有效的方法。问题是,我需要定义一个结构体,结构体和结构体,结构体内部结构。我认为这将是更好地描述它(简体):主题= {‘subj_1’,‘subj_2’,‘subj_3};运行={‘休息’,‘task1’,‘task2’,‘task3};roigroups = {' a ', ' b ', ' c '};一个= {‘dlpfc’,‘amyg};b ={‘岛’,‘postcg};c ={‘丘脑’,‘nucl_ruber '};主题=结构();%的方式,假设其他结构前面定义:i = 1:长度(主题),p = 1:长度(运行)x = 1:长度(roigroups) y = 1: eval (strcat(的长度(“,roigroups {x},’)”))主题。({})主题。(p{})运行。(roigroups {x})。(eval (strcat (eval (“roigroups {x}’), {y}))) =结构(); end end end end It works really well, manually checked, but it's a pain to write and read. Is there a workaround for this type of task? 亚希尔Catal https://ch.mathworks.com/matlabcentral/profile/authors/19501946 标签:ch.mathworks.com, 2005:问题/ 285328 2016 - 05 - 22 - t07:51:27z 2021 - 10 - 22 - t19:41:01z 如何结合多个csv到1 csv文件? 你好,我想结合多个csv文件到一个文件中。是否可以这样做?我有搜索任何地方但似乎不会返回任何值的代码或开放microsoft excel……这是我的代码:num = {};文本= {};所有= {};p = dir (“C: \ \肯尼\用户桌面\ skripsi \ pakebandingyangini \ masuk \ cowo \ * . csv”);i = 1:长度(p) (num{结束+ 1}、文本{+ 1}结束,所有{结束+ 1}]= xlsread ([C: \用户桌面\ \肯尼\ skripsi \ pakebandingyangini \ masuk \ cowo \ ', p (i) . name]);最终如何看到这段代码的输出或,我怎么能加入这些华禾投资到csv文件1单吗?谢谢你的帮助。 肯尼Chintama https://ch.mathworks.com/matlabcentral/profile/authors/8158954 标签:ch.mathworks.com, 2005:问题/ 1569763 2021 - 10 - 22 - t19:27:50z 2021 - 10 - 22 - t19:40:52z 为什么我有“数组索引必须是正整数或逻辑值”错误呢? 你好,我的新在matlab和im试图向右移动一个位置的元素数组cadena2 = [1、2、3、4、5);n =长度(cadena2);辅助= cadena2 (n);因为我= n: 1:1 cadena2 (i) = cadena2((张));结束cadena2(1) =辅助;数组下标cadena2我有这个错误:必须是正整数或逻辑值。错误Clase01102(22)行cadena2 (i) = cadena2((张));如果你能帮助我真的apreciate它 迭戈埃内斯托桑多瓦尔Vargas https://ch.mathworks.com/matlabcentral/profile/authors/24155157 标签:ch.mathworks.com, 2005:问题/ 1569123 2021 - 10 - 21 - t22:04:55z 2021 - 10 - 22 - t19:37:47z 如何绘制3 d表面两个向量和一个数组? 我想画一个三维表面,但我不能冲浪()命令直接申请一些原因。我有两个向量x和y坐标。让我们说x = linspace (-10, 100);y = linspace (-0.5, 0.5, 100);calzulate我打电话给一些函数只适用于固定的值。塞斯,我计算如下I = 1:长度为j = 1 (x):长度(y) func (I, j) = @MyFunction (__some_parameters__, x (I), y (j));最终结果我有两个向量和矩阵的大小长度(x) *长度为变量(y)。请您能告诉我,如果有任何方便的方法重写这个数据格式,适合应用冲浪()命令吗?注:我使用plot3 (x (I), y (j), func (I, j), b。)和两个周期,但这是一个荒谬的“脏攻击”,而不是表面。 Bogdan议员 https://ch.mathworks.com/matlabcentral/profile/authors/23951135 标签:ch.mathworks.com, 2005:问题/ 1569723 2021 - 10 - 22 - t17:38:24z 2021 - 10 - 22 - t19:30:55z 个性化的RGB蒙面的形象 大家好!我很新的在MatLab编程。我有一个RGB图像,我想某些颜色像素是白色的,某些像素是黑色和灰色。我使用了阈值应用(二进制面具),但我只有黑色或白色像素。 Allinone https://ch.mathworks.com/matlabcentral/profile/authors/15007176 标签:ch.mathworks.com, 2005:问题/ 1566401 2021 - 10 - 18 - t12:53:54z 2021 - 10 - 22 - t19:30:15z 需要有多少的系列精度高达三个小数点。这是系列正确金额高达3.141 形象问题的< < / matlabcentral /答案/ uploaded_files / 770591 / IMG_20211018_175541.jpg > >这是我写的,但1000年我得到的答案是错的。这对我来说非常具有挑战性的正确答案。金额= 0;我= 0;真的=π;% 3小数位精度标准而abs (sum-true)我= > = 0.001 + 1;和=和+ 4 *(1)^(张)* 1 /(2张);流(“条款要求:% d ',我) ajeet sahu https://ch.mathworks.com/matlabcentral/profile/authors/20271476 标签:ch.mathworks.com, 2005:问题/ 1567573 2021 - 10 - 20 - t01:07:15z 2021 - 10 - 22 - t19:23:17z 适当地分析降雨数据和排序的数据 你好,我需要知道我怎么对降雨数据附加到月度数据进行排序,找出干几天,最大降雨,所有事件大小,降雨量大于1毫米,10,90百分位的数据。降雨数据有6分钟时间步。谢谢 Priya Joshi https://ch.mathworks.com/matlabcentral/profile/authors/24039559 标签:ch.mathworks.com, 2005:问题/ 1569753 2021 - 10 - 22 - t18:40:28z 2021 - 10 - 22 - t19:15:33z 使用梯形法求解常微分方程的向量或矩阵符号 我已经给一个例子使用数字梯形法求解多个微分常微分方程,以及遇到问题时试图指数向量和矩阵的值在一个for循环。这是例子:我的代码如下:清晰;clc;往往= 0.1;%结束时间N = 1000;% T =往往/ N的步骤;%步长t = 0: t:一般;%时间跨度= [0 -5.38 e6;1 -47.106);%系统矩阵B = [5.38 e6; 0]; %Input Matrix I = eye(2); C1 = inv(I - A.*(T/2)); C2 = (I + A.*(T/2)); C3 = C1.*C2; %x(t) coefficient C4 = (B.*(T/2)); %u(t) coefficient % Initial Conditions x1(1) = 0; x2(1) = 0; %Create Cell Array x = zeros(2,1); xx = size(x); y = cell(xx); %Functions xdot1 = @(x1,t) x1; xdot2 = @(x2,t) x2; xdot = @(x1,x2,t)[xdot1;xdot2]; %Assign Values to Cell Array y{1} = xdot1; y{2} = xdot2; %Input ut = @(t) 187.8.*cos(377.*t); %Pre-Allocate and store results xt1 = zeros(2,N+1); %Run and store values for n=1:N xt1(n+1)= C3.*[y{1}; y{2}] + C4.*(ut(t(n)+ut(t(n+1)))); end I am recieving the following error: Error using vertcat Nonscalar arrays of function handles are not allowed; use cell arrays instead. Any help at finding my mistake would be greatly appreciated Brenton领班 https://ch.mathworks.com/matlabcentral/profile/authors/19301794 标签:ch.mathworks.com, 2005:问题/ 1569668 2021 - 10 - 22 - t16:00:36z 2021 - 10 - 22 - t19:10:31z 下标赋值尺寸不匹配错误 我有这个错误,不幸的是我似乎看不出有什么问题。这里是变量的维度:ki = 150 = 0, b = 2, hx = 0.1818, c = 0, d = 5, hy = 0.3125,π= 150 (x1双提前谢谢你!图(1)U (1: ki, 1: ki) =π;(X, Y) = meshgrid (hx: b, c:衔接:d);冲浪(X, Y、U '); 亚历山德拉罗克珊娜 https://ch.mathworks.com/matlabcentral/profile/authors/23137004 标签:ch.mathworks.com, 2005:问题/ 1569388 2021 - 10 - 22 - t09:21:51z 2021 - 10 - 22 - t18:59:55z 圆圈标记奇怪的填充 圆圈标记做一些奇怪。我如何解决这个问题?边缘的或订单还是什么?我怎么光滑的边缘?因为它是吗?不做它当它不是“填充”吗?C2是RGB颜色代码。情节(时间、应变、“o”、“颜色”,C2,“线宽”,lw, MarkerSize, ms, MarkerEdgeColor, C2, MarkerFaceColor, C2); Herline van der Spuy https://ch.mathworks.com/matlabcentral/profile/authors/13906646 标签:ch.mathworks.com, 2005:问题/ 481537 2019 - 09 - 22 - t08:52:52z 2021 - 10 - 22 - t18:47:37z matlab R2019b submitWithConfiguration不工作 事先在以前版本的matlab代码工作正常。然而,升级之后latlab R2019b,我得到以下错误的submitWithConfiguration函数它说,部分函数没有定义。这是我的代码提交()函数目录(' / lib。');conf.assignmentSlug =“逻辑回归”;conf.itemName =“逻辑回归”;conf.partArrays = {…{…' 1 ',……{乙状结肠。m '},……“乙状结肠函数”,… }, ... { ... '2', ... { 'costFunction.m' }, ... 'Logistic Regression Cost', ... }, ... { ... '3', ... { 'costFunction.m' }, ... 'Logistic Regression Gradient', ... }, ... { ... '4', ... { 'predict.m' }, ... 'Predict', ... }, ... { ... '5', ... { 'costFunctionReg.m' }, ... 'Regularized Logistic Regression Cost', ... }, ... { ... '6', ... { 'costFunctionReg.m' }, ... 'Regularized Logistic Regression Gradient', ... }, ... }; conf.output = @output; submitWithConfiguration(conf); end function out = output(partId, auxstring) % Random Test Cases X = [ones(20,1) (exp(1) * sin(1:1:20))' (exp(0.5) * cos(1:1:20))']; y = sin(X(:,1) + X(:,2)) > 0; if partId == '1' out = sprintf('%0.5f ', sigmoid(X)); elseif partId == '2' out = sprintf('%0.5f ', costFunction([0.25 0.5 -0.5]', X, y)); elseif partId == '3' [cost, grad] = costFunction([0.25 0.5 -0.5]', X, y); out = sprintf('%0.5f ', grad); elseif partId == '4' out = sprintf('%0.5f ', predict([0.25 0.5 -0.5]', X)); elseif partId == '5' out = sprintf('%0.5f ', costFunctionReg([0.25 0.5 -0.5]', X, y, 0.1)); elseif partId == '6' [cost, grad] = costFunctionReg([0.25 0.5 -0.5]', X, y, 0.1); out = sprintf('%0.5f ', grad); end end Following is the error i get Unrecognized function or variable 'parts'. Error in submitWithConfiguration (line 4) parts = parts(conf); Error in submit (line 40) submitWithConfiguration(conf); Please give me some suggestions as for how to solve this. Thanks for your time! Umang帕特尔 https://ch.mathworks.com/matlabcentral/profile/authors/13269807 标签:ch.mathworks.com, 2005:问题/ 1567163 2021 - 10 - 19 - t14:42:03z 2021 - 10 - 22 - t18:25:55z 如何使一个独立的软件,接受excel文件。 你好,我想要使用独立的软件允许人们上传Excel文件在一个特定的格式,以便它可以执行分析。因为应用程序我想做需要很多的数据输入1×1,关键是无效的。 Mehbubul Haque https://ch.mathworks.com/matlabcentral/profile/authors/23939672 标签:ch.mathworks.com, 2005:问题/ 1569423 2021 - 10 - 22 - t09:50:28z 2021 - 10 - 22 - t18:23:16z 合并行具有类似的名字 嗨,我有一个表组成的十列。在第一列,每一行都有一个惟一名称。然而,许多行有相同的四个字母开始。我想合并的行具有相同字母开始,并执行一些计算基于这些行。提前谢谢! Vlatko Milic https://ch.mathworks.com/matlabcentral/profile/authors/11257040 标签:ch.mathworks.com, 2005:问题/ 1569513 2021 - 10 - 22 - t12:04:23z 2021 - 10 - 22 - t18:17:24z 我怎么情节相同大小的圆广场(100 * 100 m ^ 2)没有重叠? 我有一个与L = 100和W = 100平方,以及一个圆与一个固定的直径。没有重叠,我必须填补这一方与圆。(各界必须是相同的大小和适合给定的平方范围内。) Manisha Kumari https://ch.mathworks.com/matlabcentral/profile/authors/19275171 标签:ch.mathworks.com, 2005:问题/ 1569628 2021 - 10 - 22 - t15:10:19z 2021 - 10 - 22 - t18:14:07z 如何计算平均值和标准偏差,从图像然后从原始图像减去迭代使用matlab ? 这意味着是当地的平均值和标准偏差统计特性。这意思意味着滤波器或标准差健康 南非 https://ch.mathworks.com/matlabcentral/profile/authors/19455016 标签:ch.mathworks.com, 2005:问题/ 1569643 2021 - 10 - 22 - t15:28:00z 2021 - 10 - 22 - t18:12:56z 情节人物相同的图(MATLAB) 亲爱的会员,我有这个程序为一个矩阵H = [0 1 1 0 1 0 1 1 1 0;0 1 1 1 0 1 0 0 1 1;1 1 1 0 0 1 1 1 0 0;1 0 0 1 1 0 0 1 1 1;1 0 0 1 1 1 1 0 0 1);dvi = (H, 1)之和;dci = (H, 2)的总和;(副词,击穿电压)=嘘(dvi,独特的(dvi));(adc, bdc) =嘘(dci,独特的(dci));dv =总和(放置/(副词)总和)。*击穿电压); dc = sum((adc./sum(adc)).*bdc); set(gca,'XTick',[]); set(gca,'YTick',[]); adv(adv == 0) = NaN; stem(bdv,adv,'linewidth',2); hold on; adc(adc == 0) = NaN; stem (bdc,adc, 'linewidth',2); xlim([min(min(bdv),min(bdc))-1 max(max(bdv),max(bdc))+1]); xlabel('Degree of nodes'); ylabel('Number of nodes'); grid on; axis on; legend('dv','dc','location','NorthEast'); I got this figure In the case of adding another matrix and to plot the result of the two matrices in one figure, how can I do that please. 高速 https://ch.mathworks.com/matlabcentral/profile/authors/22055534 标签:ch.mathworks.com, 2005:问题/ 1564931 2021 - 10 - 15 - t23:42:23z 2021 - 10 - 22 - t18:11:19z 使用cell2mat问题 我有一个25 25个单元阵列。每个单元格都包含一个由32个数组类型的双32。当我使用cell2mat MATLAB给我以下错误:错误使用猫要连接的数组的维度是不一致的。任何想法如何解决这个问题?我有MATLAB R2021a 阿尔贝托裴瑞兹 https://ch.mathworks.com/matlabcentral/profile/authors/15975343 标签:ch.mathworks.com, 2005:问题/ 1569738 2021 - 10 - 22 - t17:49:18z 2021 - 10 - 22 - t18:10:16z 为什么我得到这个错误?索引 嗨,所以我得到了这两个变量:Time_AIS1是一个时间变量,很多次。Times_msg_match Time_AIS1的线,我想要的。我怎么能让他们不被索引的问题。的消息是:无法使用一个值类型的细胞作为一个索引。我理解这个问题,但我不让如何改变正常工作。我的代码生成Time_msg_match是:Time_msg_match {K} = complete_match_AIS;我怎么能直接改变的时候?因为我改变它以下方式但我得到另一个错误:Time_msg_match {K} = Time_AIS1 (complete_match_AIS);错误如下:细胞内容non-cell数组赋值。提前谢谢你 韦森特Noguer https://ch.mathworks.com/matlabcentral/profile/authors/21533143 标签:ch.mathworks.com, 2005:问题/ 1569743 2021 - 10 - 22 - t18:08:29z 2021 - 10 - 22 - t18:09:16z 我找不到先进的参数集的所有参数描述仿真软件配置参数万博1manbetx 如下描述,我想找测试设备供应商和类型参数。我能找到它在所有的目的。但我不能找到它在通常使用的参数。图1图2 金立群方 https://ch.mathworks.com/matlabcentral/profile/authors/16634047 标签:ch.mathworks.com, 2005:问题/ 1567738 2021 - 10 - 20 - t07:32:39z 2021 - 10 - 22 - t18:08:16z 我如何获得微分算符的FFT运算符F (▽) ? 我想写一个matlab程序,解决了最小二乘问题通过使用FFT(快速傅里叶变换),但我不知道如何在matlab计算:F (▽^ T▽), F意味着FFT,▽是应用于一个M×N的形象。等待你的好心的帮助,提前谢谢你。 苏琪刘 https://ch.mathworks.com/matlabcentral/profile/authors/11476994 标签:ch.mathworks.com, 2005:问题/ 1569733 2021 - 10 - 22 - t17:48:55z 2021 - 10 - 22 - t18:06:33z 颜色阈值工具耗尽内存 我想使用颜色阈值工具在图像处理工具箱段和面具非常大的RGB整场幻灯片显微镜图像(平均约30000 x 20000像素)。我的图像压缩SVSs(几百MB),虽然我也可以让他们口角。工具加载图像后,提示我选择一个颜色空间,我这样做,然后工具冻结和我收到以下消息:警告:执行时发生错误的侦听器回调images.internal.app.colorThresholder.ColorSpaceMontageView类SelectedColorSpace属性PostSet事件:错误使用matlab.images.internal.rgb2hsv要求42277 x60589x3 (57.3 gb)数组超过最大数组大小的偏好(15.9 gb)。这可能导致MATLAB变得反应迟钝。错误rgb2hsv(50行)h = matlab.images.internal.rgb2hsv(日记);错误images.internal.app.colorThresholder.ColorSegmentationTool images.internal.app.colorThresholder.ColorSegmentationTool computeColorspaceRepresentation错误/ colorSpaceSelectedCallback错误images.internal.app.colorThresholder.ColorSegmentationTool > @ (hobj, evt) self.colorSpaceSelectedCallback (evt)错误images.internal.app.colorThresholder.ColorSpaceMontageView / selectFromButtons(第161行)。SelectedColorSpace = src.String;错误在images.internal.app.colorThresholder.ColorSpaceMontageView > @ (src, evt) self.selectFromButtons (src, evt)(第148行)“回调”,@ (src evt) self.selectFromButtons (evt) src);相关文档> images.internal.app.colorThresholder / ColorSpaceMontageView selectFromButtons(第161行)在images.internal.app.colorThresholder.ColorSpaceMontageView > @ (src, evt) self.selectFromButtons (src, evt)(第148行)> >有办法增加可用内存的阈值和blockproc工具或让它工作吗?我已经将Java堆内存设置为最大值(4075 MB),压缩我的图像文件,减少了50%的像素尺寸。 I also tried using bigimage or blockedImage but it looks like they are incompatible with the tool. 约翰逊航天中心 https://ch.mathworks.com/matlabcentral/profile/authors/16456306 标签:ch.mathworks.com, 2005:问题/ 1569563 2021 - 10 - 22 - t13:50:47z 2021 - 10 - 22 - t18:04:25z 为什么我看到一个奇异矩阵的警告? 我发布这个问题作为一个“响应”造成别人的问题,但作为一个回答另一个问题。因为我不能回答到问题的那个人,我会发布自己的问题,因为这似乎是一个我见过太多的问题。一个= [2 1 5;0 1 2;0 0 2];[V D] = eig(一个);%返回矩阵的特征向量V %特征值的特征向量诊断接头(D) %,但现在,当我试着恢复的特征值和特征向量,%这个操作失败,我得到一个奇异矩阵的警告?这是为什么呢?V \ D *更糟糕的是,结果不繁殖?eig是什么毛病? A 约翰D 'Errico https://ch.mathworks.com/matlabcentral/profile/authors/869215 标签:ch.mathworks.com, 2005:问题/ 448005 2019 - 03 - 03 - t17:40:26z 2021 - 10 - 22 - t17:45:32z 如何修复这个错误在gadecode(行号 清除所有ff =“testfunction”;npar = 2;麦克斯特= 100;mincost = -9999999;popsize = 16;mutrate =含量;选择= 0.5;nbits = 8;元= nbits * npar;保持地板=(选择* popsize); iga=0; pop=round(rand(popsize,Nt)); par=gadecode(pop,0,10,nbits); cost=feval(ff,par); [cost,ind]=sort(cost); par=par(ind,:); pop=pop(ind,:); minc(1)=min(cost); meanc(1)=mean(cost); while igaodds(id-1) ma(ic)=id-1; end if pick2(ic)<=odds(id) & pick2(ic)>odds(id-1) pa(ic)=id-1; end end % id ic=ic+1; end ix=1:2:keep; xp=ceil(rand(1,M)*(Nt-1)); pop(keep+ix,:)=[pop(ma,1:xp) pop(pa,xp+1:Nt)]; pop(keep+ix+1,:)=[pop(pa,1:xp) pop(ma,xp+1:Nt)]; nmut=ceil((popsize-1)*Nt*mutrate); mrow=ceil(rand(1,nmut)*(popsize-1))+1; mcol=ceil(rand(1,nmut)*Nt); for ii=1:nmut pop(mrow(ii),mcol(ii))=abs(pop(mrow(ii),mcol(ii))-1); end par(2:popsize,:)=gadecode(pop(2:popsize,:),0,10,nbits); cost(2:popsize)=feval(ff,par(2:popsize,:)); [cost,ind]=sort(cost); par=par(ind,:); pop=pop(ind,:); minc(iga+1)=min(cost); meanc(iga+1)=mean(cost); if iga>maxit | cost(1) 恋人》 https://ch.mathworks.com/matlabcentral/profile/authors/13359613 标签:ch.mathworks.com, 2005:问题/ 1569713 2021 - 10 - 22 - t17:20:38z 2021 - 10 - 22 - t17:43:00z 一个函数不使用一个数组作为输入参数 我有以下函数MyFun = @ (a, x)(积分(@ k (k)。* (1。/ (1 + (* k - x) ^ 2)), 1, 1)。/……积分(@ (k) 1。/ (1 + (* k - x) ^ 2), 1, 1));这就是我有一个向量(或数组)的数据x。假设x = 0: 1: 10;当我试着调用MyFun (x)我得到一个错误“矩阵维度必须同意”。请您能告诉我,如何解决? Bogdan议员 https://ch.mathworks.com/matlabcentral/profile/authors/23951135 标签:ch.mathworks.com, 2005:问题/ 1569728 2021 - 10 - 22 - t17:39:05z 2021 - 10 - 22 - t17:39:05z 什么剂量”B = convertToLogBoard(....)”是为了和我怎么使用它呢? 我想知道我怎样才能使用B = convertToLogBoard(…),我可以使用它吗? Diyara拉希德 https://ch.mathworks.com/matlabcentral/profile/authors/23665319 标签:ch.mathworks.com, 2005:问题/ 1569443 2021 - 10 - 22 - t10:27:16z 2021 - 10 - 22 - t17:33:19z Hardstop intlinprog &返回当前的解决方案万博 尤文图斯 嗨,我试图使用intlinprog优化生产计划对三种不同商品有六个不同的产品配置。我具体问题具体分析的方法用于解决方案&我很自信我的代码的正确性。我想hardstop intlinprog &绑定一些迭代后分支。我试着改变MaxTime & RelativeGapTolerance使用optimoptions,但我越来越错误。我认为我不能够正确地关联结构选择问题。有人能帮助我。一个示例代码片段illutrate问题是——:x = optimvar (“x”);y = optimvar (y);概率= optimproblem;f = exp (x) * (8 x + 3 y + 1); prob.Objective = f; cons1 = x + y >= 1.5; cons2 = 5x-3y >= -10; prob.Constraints.cons1 = cons1; prob.Constraints.cons2 = cons2; z=prob2struct(prob); soln=intlinprog(z); Note-: This is not my code, just included an example so that someone can show me how to integrate options in intlinprog when input is problem structures. Questions-: 1) Can someone show me how to change the default Maxtime or relative tolerance to stop the run after some iterations & return the current values of variable? 2) I read somewhere that default MaxTime for intlinprog is 7200 hrs. So shouldn't the program stop after that time & give you the current results automatically? Samyak辛格 https://ch.mathworks.com/matlabcentral/profile/authors/24411573 标签:ch.mathworks.com, 2005:问题/ 757209 2021 - 02 - 11 - t05:00:00z 2021 - 10 - 22 - t17:27:28z 我如何设置LD_PRELOAD Hadoop集群? 我测试两个脚本,一个使用火花和使用MapReduce, Hadoop集群上运行Red Hat Enterprise Linux 7.6。我收到以下错误:错误:失败/usr/lib/jvm/java - 1.8.0 openjdk 1.8.0.232.b09 - 0. el7_7.x86_64 / jre / lib / amd64 /服务器/ libjvm。所以,……因为/应用程序/ matlab / R2020b / sys / os / glnxa64 / libstdc + + . so。6:未定义符号:__cxa_thread_atexit_impl这似乎是由于节点GLIBC 2.17安装和GLIBC 2.18中定义这个符号开始。我知道有一个垫片图书馆GLIBC 2.17使用MATLAB R2020b,但我怎么能强迫集群查找并加载吗? MathWorks支万博1manbetx持团队 https://ch.mathworks.com/matlabcentral/profile/authors/4622813