I think I have a simple problme. I have 4 plots in my code as you can see, however, it seems that Legend does not recognize my last plot.
Screen Shot 2019-01-25 at 8.13.51 PM.png

2 comentarios

madhan ravi
madhan ravi el 26 de En. de 2019
show your legend and plot calls
Othman Alahmari
Othman Alahmari el 26 de En. de 2019
Here is my code:
I = 0:0.001:0.1;
R1 = 95.7;
R2 = 198.33;
V1 = I * R1;
V2 = I * R2;
V3 = 0:1:14;
plot(I,V1,'-k')
hold on
plot(I,V2,'-g')
plot(I,12,'-rx')
plot(0.1,V3,'-bo')
hold off
title('Voltage and Current')
legend('V(R1)','V(R2)','Voltage limit','current limit');
xlabel('Current DC (A)')
ylabel('Volatge DC (V)')

Iniciar sesión para comentar.

 Respuesta aceptada

madhan ravi
madhan ravi el 26 de En. de 2019

0 votos

plot(I,repmat(12,1,numel(I)),'-rx')
plot(repmat(0.1,1,numel(V3)),V3,'-bo')

Más respuestas (0)

Etiquetas

Preguntada:

el 26 de En. de 2019

Respondida:

el 26 de En. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by