Plotting functions
2 ビュー (過去 30 日間)
古いコメントを表示
How to create a variable t that takes values from 0 to 2pie with step size 0.001 . I already given de value of y. I wish to know how to plot and versus t in separate figures. What about plot and versus t in the same figure and use different colour for each graph and label each of them.
Then if I want to divide a figure in two by using the subplot command, then plot and in the upper part and in the lower part which all plots versus t. how ya??
0 件のコメント
回答 (2 件)
Walter Roberson
2011 年 2 月 19 日
t = 0:.001:2*pi;
For the rest, see the documentation for hold(), plot(), and subplot()
0 件のコメント
Matt Fig
2011 年 2 月 19 日
To elaborate on Walter's answer:
t = 0:.001:2*pi;
figure
plot(t,sin(t));legend('sin(t)')
figure
plot(t,cos(t));legend('cos(t)')
% Now on to subplotting:
figure
subplot(2,1,1)
plot(t,sin(t));legend('sin(t)')
subplot(2,1,2)
plot(t,cos(t));legend('cos(t)')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!