フィルターのクリア

Velocity_vs_time graph

1 回表示 (過去 30 日間)
Aled
Aled 2011 年 2 月 24 日
I have a code generated in matlab which i am to use of a car coasting down from 120mph => 0mph for velocity against distance, my question is how do i plot velocity against time. I have used an ODE45 function for distance, can i use this method or does and alternative need to be used,
[t,x]=ode45(@frontwing,timerange,initialvalues) plot(x(:,1),x(:,2)) rk=[x(2);-F.rr/mass-Fdrag*x(2).^2/mass]
thanks

回答 (2 件)

Jiro Doke
Jiro Doke 2011 年 2 月 24 日
Perhaps
plot(t, x(:, 2))
  1 件のコメント
Jan
Jan 2011 年 2 月 24 日
That's plain. +1

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


Paulo Silva
Paulo Silva 2011 年 2 月 24 日
v=diff(x)./diff(t); %aproximated derivative
plot(t(1:numel(v)),v)
%I didn't use plot(t,v)
%because the dimensions of t and v might not be the same

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by