Plotting differential equations, need help

조회 수: 4 (최근 30일)
Andrew
Andrew 2014년 10월 6일
댓글: Yu Jiang 2014년 10월 6일
y = diff(sin(2*pi*t))./diff(t);
plot(t,y)
Remember diff() shortens the length of your vector by one so you will need to define a new time vector to plot against. ---- how do i do this?
thank you

채택된 답변

Yu Jiang
Yu Jiang 2014년 10월 6일
plot(t(2:end),y)
  댓글 수: 8
Andrew
Andrew 2014년 10월 6일
its ok, i fixed it. thanks for your help sir.
Yu Jiang
Yu Jiang 2014년 10월 6일
You are welcome.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by