필터 지우기
필터 지우기

How to find out particular value of t (j) at which y(j) is equal to some value lets say 4 (without looking graph) ? Thanks.

조회 수: 1 (최근 30일)
N=100;
dt=0.05;
k=2;
t=zeros(N,1);
y=zeros(N,1);
y(1)=2;t(1)=0;
for j=1:N-1
t(j+1)=t(j)+dt;
y(j+1)=y(j)+dt*(2+k);
end
plot(t,y)

답변 (1개)

Star Strider
Star Strider 2018년 3월 27일
Try this:
yi = 4
ti = interp1(y, t, yi)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by