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

조회 수: 3 (최근 30일)
androSLO
androSLO 2014년 1월 23일
댓글: androSLO 2014년 1월 25일
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.

답변 (1개)

Walter Roberson
Walter Roberson 2014년 1월 23일
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
androSLO
androSLO 2014년 1월 24일
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 2014년 1월 25일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by