필터 지우기
필터 지우기

how to plot this programme

조회 수: 1 (최근 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 CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by