フィルターのクリア

How to plot the graph for different values of parameters?

6 ビュー (過去 30 日間)
parag gupta
parag gupta 2019 年 7 月 19 日
コメント済み: Jerry121 2020 年 10 月 10 日
In my mathematical model I have one parameter "c" .I got the graphs of the equations for " c = 1" but now I want the graphs for c= 1 and c = 10 in one graph so that I see the effect of c in my model i.e.to see what will happen if c is increased from 1 to 10.
Could someone pls tell me how to do that?
I have attached the code.

回答 (1 件)

Mario Chiappelli
Mario Chiappelli 2019 年 7 月 19 日
This code worked for me in the past when comparing two graphs, essentially you need to use the hold command.
figure(1);
hold on
plot(x1,y1,"r-");
plot(x2,y2,'r--');
xlabel('xlabel');
ylabel('ylabel');
hold off
ylim([lowerLimit upperLimit]);
title('Your Title');
legend('C=1','C=10');
Hope this helps :)
  2 件のコメント
parag gupta
parag gupta 2019 年 7 月 19 日
" c " is the parameter in my model. For " c = 1" I will get one graph, when I will run the same program for " c = 10 " I will get other graphs. Now I want both graphs in one graphs.
The code u mentioned above is for something else.
Jerry121
Jerry121 2020 年 10 月 10 日
Having similar issue, Did you get the solution for this?

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

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by