フィルターのクリア

how to use the return ?

2 ビュー (過去 30 日間)
Qiaoli Ji
Qiaoli Ji 2018 年 1 月 3 日
My question is that when the if condition was executed and return was executed too. The whole procedure will stop. The following figure code will not been executed. But I want to draw figures. So what should I do? Thanks.
for s=1:length(NFORCE)
if (NFORCE(:,s)>=100)|(HFORCE(:,s)<=0)
t_global = test_time; %%stop the experiment
return;
end
end
figure
plot(Q1,'r');
xlabel('N'); ylabel('angular');
hold on;
plot(Q2,'b');
legend('q1','q2');
hold off;

回答 (0 件)

カテゴリ

Help Center および File Exchange图形对象编程 についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!