matlab

Can you preallocate an array of random size?

纵饮孤独 提交于 2021-02-10 04:58:09
问题 The essential part of the code in question can be distilled into: list=rand(1,x); % where x is some arbitrarily large integer hitlist=[]; for n=1:1:x if rand(1) < list(n) hitlist=[hitlist n]; end end list(hitlist)=[]; This program is running quite slowly and I suspect this is why, however I'm unaware how to fix it. The length of the hitlist will necessarily vary in a random way, so I can't simply preallocate a 'zeros' of the proper size. I contemplated making the hitlist a zeros the length of

CatiaMagic — 基于MBSE的产品创新和正向开发工具

寵の児 提交于 2021-02-09 11:02:04
CatiaMagic,原名MagicDraw,被达索收购后融入3DExperience产品协同研发管理平台中。该软件提供对SysML/UML/UAF语言的完整支持,提供独有的MagicGrid方法论,涵盖业务和任务分析、利益攸关者需要及需求分析、系统需求定义、系统架构定义、设计方案权衡、系统分析验证及协同设计管理等内容,支持早期对方案可行性进行快速验证,并更快地分析替代方案,探索更完整的设计空间。采用基于模型的协同设计,实现模型元素追溯,便于变更管理及影响分析、提高设计重用、沟通和理解质量。 产品功能 • 专业的系统工程方法论 基于INCOSE OOSEM方法和工程实践提出了适用于复杂产品开发的MagicGrid方法论。该方法按照产品不同的研制阶段需要关注的问题将设计过程分为问题域(产品需求分析)、解决方案域(产品方案设计)及实现域。在不同域内部,将分析过程细分为需求、行为、外部环境及能效指标四个视角维度,以便更全面的表达产品应具备的属性。通过不断的设计迭代,实现复杂产品的正向设计及完整的追溯过程。软件依据MagicGrid方法论,提供设计向导、流程模板,通过实践,帮助MBSE在研发各阶段落地实施。 • 仿真分析功能 提供模型执行框架(OMG fUML、W3C SCXML、JSR223等);支持模型调试和执行动画环境;支持用户交互界面建模和执行;内嵌求解器,支持与多学科专业分析工具

MATLAB plot's MarkerIndices property

微笑、不失礼 提交于 2021-02-09 10:54:01
问题 How can I use MarkerIndices with plot ? x = linspace(-10,10,101); y = sin(x); plot(x, y, 'color', 'blue', ... 'LineStyle','-', ... 'Marker', 's', ... 'MarkerIndices', [1, 5, 10], ... 'MarkerEdgeColor', 'black',... 'MarkerFaceColor','yellow'); Error message Error using plot There is no MarkerIndices property on the Line class. Error in plotting3 (line 4) plot(x, y, 'color', 'blue', ... 回答1: MarkerIndices became available in R2016b version. The workaround is plotting two times: MarkerIndices =

MATLAB plot's MarkerIndices property

大兔子大兔子 提交于 2021-02-09 10:53:11
问题 How can I use MarkerIndices with plot ? x = linspace(-10,10,101); y = sin(x); plot(x, y, 'color', 'blue', ... 'LineStyle','-', ... 'Marker', 's', ... 'MarkerIndices', [1, 5, 10], ... 'MarkerEdgeColor', 'black',... 'MarkerFaceColor','yellow'); Error message Error using plot There is no MarkerIndices property on the Line class. Error in plotting3 (line 4) plot(x, y, 'color', 'blue', ... 回答1: MarkerIndices became available in R2016b version. The workaround is plotting two times: MarkerIndices =

MATLAB streamribbon edge color

家住魔仙堡 提交于 2021-02-09 02:56:32
问题 In a streamribbon plot, how do you plot the edges of the ribbon itself, as opposed to the edges of every face? For example: figure load wind [sx sy sz] = meshgrid(80,20:10:50,0:5:15); h = streamribbon(x,y,z,u,v,w,sx,sy,sz); axis tight shading interp; view(3); camlight lighting gouraud Produces: If I add set(h,'edgecolor','k') I get: Whereas what I'm looking for is something like this (top and left sides of image have been edited with gimp, to make the point of what I'm chasing): 回答1: As said

MATLAB streamribbon edge color

拜拜、爱过 提交于 2021-02-09 02:56:24
问题 In a streamribbon plot, how do you plot the edges of the ribbon itself, as opposed to the edges of every face? For example: figure load wind [sx sy sz] = meshgrid(80,20:10:50,0:5:15); h = streamribbon(x,y,z,u,v,w,sx,sy,sz); axis tight shading interp; view(3); camlight lighting gouraud Produces: If I add set(h,'edgecolor','k') I get: Whereas what I'm looking for is something like this (top and left sides of image have been edited with gimp, to make the point of what I'm chasing): 回答1: As said

MATLAB streamribbon edge color

为君一笑 提交于 2021-02-09 02:54:31
问题 In a streamribbon plot, how do you plot the edges of the ribbon itself, as opposed to the edges of every face? For example: figure load wind [sx sy sz] = meshgrid(80,20:10:50,0:5:15); h = streamribbon(x,y,z,u,v,w,sx,sy,sz); axis tight shading interp; view(3); camlight lighting gouraud Produces: If I add set(h,'edgecolor','k') I get: Whereas what I'm looking for is something like this (top and left sides of image have been edited with gimp, to make the point of what I'm chasing): 回答1: As said

unwrap picture of a half cylinder in MATLAB

随声附和 提交于 2021-02-08 17:02:00
问题 My problem is as follows: I have the picture of a half cylinder taken from a horizontal perspective and it has square grid lines on it, so I was wondering how can I implement in MATLAB to unwrap this half cylinder so all my grid cells become the same size? I know I will loose lots of resolution in the edge cells and a simple linear interpolation should do the trick, but I do not know how to tell MATLAB to do this. Also I know the geometrical properties of the cylinder, radius and height. Any

unwrap picture of a half cylinder in MATLAB

筅森魡賤 提交于 2021-02-08 17:01:28
问题 My problem is as follows: I have the picture of a half cylinder taken from a horizontal perspective and it has square grid lines on it, so I was wondering how can I implement in MATLAB to unwrap this half cylinder so all my grid cells become the same size? I know I will loose lots of resolution in the edge cells and a simple linear interpolation should do the trick, but I do not know how to tell MATLAB to do this. Also I know the geometrical properties of the cylinder, radius and height. Any

unwrap picture of a half cylinder in MATLAB

烈酒焚心 提交于 2021-02-08 17:01:13
问题 My problem is as follows: I have the picture of a half cylinder taken from a horizontal perspective and it has square grid lines on it, so I was wondering how can I implement in MATLAB to unwrap this half cylinder so all my grid cells become the same size? I know I will loose lots of resolution in the edge cells and a simple linear interpolation should do the trick, but I do not know how to tell MATLAB to do this. Also I know the geometrical properties of the cylinder, radius and height. Any