how to plot this programme

2 ビュー (過去 30 日間)
ad lyn
ad lyn 2022 年 3 月 6 日
コメント済み: ad lyn 2022 年 3 月 6 日
njmp1 = 50000;
njmp2 =60000;
njmp3= 70000;
fc1=1;fc2=3;
fcx=2;
for i = 1:20
%------------------------------------------------------------------------------------
fcs(i)=1;
switch saut
case 1
switch type_Saut
case 1
if i>=njmp1
fcs(i)=fcx;
end
case 2
a=(fc2-fc1)/(njmp2-njmp1);
b=fc1-a*njmp1;
if (i>=njmp1) && (i<=njmp2)
fcs(i)=a*i+b;
elseif (i>njmp2)
a=(fc1-fc2)/(njmp3-njmp2);
b=fc2-a*njmp2;
if (i>=njmp2) && (i<=njmp3)
fcs(i)=a*i+b;
end
end
end
case 2
fcs(i)=1;
end
end;
Unrecognized function or variable 'saut'.
y=fcs(i)
plot(y)
  1 件のコメント
John D'Errico
John D'Errico 2022 年 3 月 6 日
How can anyone help? The variable saut is undefined. MATLAB told you exactly that.

サインインしてコメントする。

採用された回答

Voss
Voss 2022 年 3 月 6 日
Try changing this
y = fcs(i)
plot(y)
to this
plot(fcs)
  1 件のコメント
ad lyn
ad lyn 2022 年 3 月 6 日
thank youthank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeClassical Control Design についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by