How i can multiple plots do that are curves with basic fitting?

7 vues (au cours des 30 derniers jours)
androSLO
androSLO le 23 Jan 2014
Commenté : androSLO le 25 Jan 2014
Hello,
I have tried to multiple plots to do them curves but if i do one and want another then first one disappears. Is there some solution in matlab function to do that are multiple or isn't at all possible? This is what i want to do:
I would like that i have for the green plot curve like for the blue (i would like to have one more quadratic for green). Thank you in advance for answers.

Réponses (1)

Walter Roberson
Walter Roberson le 23 Jan 2014
After plotting the first one, give the command
hold on
and then plot more. When it is time to allow a new plot to overwrite what has gone before
hold off
  2 commentaires
androSLO
androSLO le 24 Jan 2014
Thank you for that but how can i give between two plots if i have this code:
clc clear all y1=[52.50 48.75 30 20 13.75 10 7.50 5 3]; x=[253 241 207 184 161.1 137.8 114.6 92.3 68.8]; y2=[0.683 0.586 0.347 0.237 0.157 0.117 0.092 0.075 0.060]; %figure 1 [AX,H1,H2] = plotyy(x,y1,x,y2,'plot'); set(get(AX(1),'Ylabel'),'String','P_1_0 [W]') set(get(AX(2),'Ylabel'),'String','I_1_0 [A]') ylim([0 60]) xlabel('U_1_0 [V]') title('Diagram odvisnosti P_1_0 in I_1_0 od napetosti U_1_0') grid on % %figure 2
x1 = 230; y11=interp1(x,y1,x1) Y21=interp1(x,y2,x1)
androSLO
androSLO le 25 Jan 2014
I have tried but nothing goes. Always when i go on figure and basic fitting when i choose data 1 in makes curve and when i choose data 2 delete first curve and makes for data 2.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by