Clear Filters
Clear Filters

How can I combine two curves ,?

5 views (last 30 days)
Mallouli Marwa
Mallouli Marwa on 13 Jan 2019
Commented: Star Strider on 11 Dec 2020
Hello
How can I combine this two figures in one curve like the Wanted figure ?
  4 Comments
madhan ravi
madhan ravi on 13 Jan 2019
after the first plot command
doc hold
Mallouli Marwa
Mallouli Marwa on 13 Jan 2019
I have obtain just one curve.
Please see my progr

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 13 Jan 2019
This is how I would do it:
loglog(R_load,v0,'b',R_load,v05,'m',R_load,v1,'g')
hold on % <— ADD ‘hold on’ HERE
%orange = [1 0.5 0.2];
%line(freq,v1, 'Color', orange);
legend('ratio 0.0','ratio 0.5','ratio 1')
xlabel('Load resistance (\Omega)')
ylabel('|Voltage FRF| [V/g]')
Nice_Fig(h,0,lw)
%% Power vs resistance
pr0= [5.53330461588560e-14;2.70674069235245e-13;5.07036186562365e-13;8.08973579370763e-13;9.07539849421583e-13;8.94382414405997e-13;8.37180419286161e-13;7.68654749197008e-13;7.01922515839135e-13;6.41399547172525e-13;5.41330637259509e-13;1.19476813063000e-13;5.99323391318194e-14;2.99905095920662e-14;1.19989327546552e-14;5.99966135070715e-15;2.99985504801608e-15;1.19994474897302e-15;5.99972569470345e-16];
pr05 = [2.80762261815343e-14;1.39258296006788e-13;2.71724768142459e-13;4.95151098791241e-13;6.46905100054120e-13;7.30583282433469e-13;7.63124936938331e-13;7.62557944596732e-13;7.42798593368138e-13;7.13094938617482e-13;6.44063415001232e-13;1.65175855606808e-13;8.33229796193972e-14;4.17543957744564e-14;1.67121934980303e-14;8.35684265188537e-15;4.17851457420524e-15;1.67141627378583e-15;8.35708882905653e-16];
pr1 = [1.53198788031425e-14;7.61924226944048e-14;1.49896109249637e-13;2.81408463569629e-13;3.82971909933166e-13;4.51957740885659e-13;4.92230456172239e-13;5.10384251005558e-13;5.13030986646621e-13;5.05577219664000e-13;4.74984189658332e-13;1.35241511274324e-13;6.85279853024376e-14;3.43793046020861e-14;1.37646924655975e-14;6.88327370481590e-15;3.44175280593998e-15;1.37671410973164e-15;6.88357982544083e-16];
R_load = [100; 5e2; 1e3; 2e3; 3e3;4e3; 5e3; 6e3;7e3;8e3; 10e3; 50e3; 100e3; 200e3;500e3; 1e6; 2e6;5e6; 10e6];
h = Fig_Exist('Power vs resis');
loglog(R_load,pr0*1e6,'b',R_load,pr05*1e6,'m',R_load,pr1*1e6,'g')
%orange = [1 0.5 0.2];
%line(freq,v1, 'Color', orange);
legend('ratio 0.0','ratio 0.5','ratio 1')
xlabel('Load resistance (\Omega)')
ylabel('|Power FRF| [\mu W/g^2]')
Nice_Fig(h,0,lw)
hold off % <— ADD ‘hold off’ HERE
  2 Comments
Yongming Sun
Yongming Sun on 11 Dec 2020
Can I add labels to each curves by using 'hold on & off'?
Star Strider
Star Strider on 11 Dec 2020
Yongming Sun —
To add labels to the curves themselves, use the text function.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!