필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Piecewise defined function ouput array problem

조회 수: 1 (최근 30일)
Peter M Hogan
Peter M Hogan 2019년 2월 9일
마감: Peter M Hogan 2019년 2월 9일
Here is the problem:
t=linspace(0,50,100);
v=[];
for i =linspace(1,100)
if t(i)<10 && t(i)>~0
v(i)= 11*t(i)^2-5*t(i)
elseif t(i)>~10 && t(i)<20
v(i)=1100-5*t(i)
elseif t(i)>~20 && t(i)<30
v(i)=50*t(i)+2*(t(i)-20)^2
elseif t(i)>~30
v(i)=1520*exp(-.2*(t(i)-30))
end
end
that is my code. i cant get all my outputs to store in same vector. help!
Thanks
Peter

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by