フィルターのクリア

how can i subplot 4 separate graphs for machine's velocity

1 回表示 (過去 30 日間)
Austin
Austin 2013 年 10 月 29 日
コメント済み: sixwwwwww 2013 年 10 月 29 日
A machine velocity while traveling on a particular road = 70*exp(-t/M) t=0:0.5:10
M is the mass of the Machine. Machine1 is 100kg Machine2 is 150kg Machine3 is 200kg how can i subplot the velocity vs time graph of each machine so that i get the velocity-time graph of each respective machine?
below is what ive tried. Welcome other alternative suggestions!
V0=70 for m=100:50:200 l=length(m) for i=1:l t=linspace(0,10,l) V(i)=70.*exp(-t(i)./M(i)); subplot(3,1,i) plot(t,V)
end
end

採用された回答

sixwwwwww
sixwwwwww 2013 年 10 月 29 日
Here is one alternate:
V = 70;
machine = [100 150 200 250];
t=0:0.5:10;
for i = 1:numel(machine)
road = V*exp(-t/machine(i));
subplot(2,2,i), plot(t, road), title(strcat('weight:', num2str(machine(i))))
end
  2 件のコメント
Austin
Austin 2013 年 10 月 29 日
Thanks Lots! this alternative works!
sixwwwwww
sixwwwwww 2013 年 10 月 29 日
You are welcome

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by