Simulink: Create line object - Matrix vs. vector input
显示 更早的评论
Why is there a difference between
figure;
process = {'process' , [0.2500 0.5000], [0.6 0.8];
'process2', [0.1250 0.2500], [0.2 0.6];
'process3', [0.3125 0.2500], [0.4 0.6];
'process4', [0.2500 0.3125], [0.2 0.4];
'process5', [0.3750 0.3125], [0.2 0.4];
'process5', [0.5625 0.5000], [0.6 0.8];};
L=line(cell2mat(process(:,2)), cell2mat(process(:,3)));
and
figure;
process = {'process' , [0.2500 0.5000], [0.6 0.8];
'process2', [0.1250 0.2500], [0.2 0.6];
'process3', [0.3125 0.2500], [0.4 0.6];
'process4', [0.2500 0.3125], [0.2 0.4];
'process5', [0.3750 0.3125], [0.2 0.4];
'process5', [0.5625 0.5000], [0.6 0.8];};
hold on
L=line(cell2mat(process(1,2)), cell2mat(process(1,3)));
L=line(cell2mat(process(2,2)), cell2mat(process(2,3)));
L=line(cell2mat(process(3,2)), cell2mat(process(3,3)));
L=line(cell2mat(process(4,2)), cell2mat(process(4,3)));
L=line(cell2mat(process(5,2)), cell2mat(process(5,3)));
L=line(cell2mat(process(6,2)), cell2mat(process(6,3)));
?

Is there a way that enables me to use the first version (= using the line function only once) with the result of the second one?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!