Plotting different variable sets on same graph

1 visualización (últimos 30 días)
notalwayssure
notalwayssure el 20 de En. de 2022
Comentada: notalwayssure el 20 de En. de 2022
I have two sets of data; Current1 (x), Power1 (y) & Current2 (x), Power2 (y). Matlab will only plot the first set of variables and not the second set. I believe it has something to do with two different x axis. How do I combine these two into one plot? I want to compare the trends since it is the same type of data in each set.
plot(Current1, Power1,'r')
plot(Current2, Power2,'b')
  1 comentario
Ankit
Ankit el 20 de En. de 2022
Retain current plot when adding new plots
plot(Current1, Power1,'r');hold on
plot(Current2, Power2,'b');

Iniciar sesión para comentar.

Respuesta aceptada

Voss
Voss el 20 de En. de 2022
plot(Current1, Power1,'r')
hold on
plot(Current2, Power2,'b')

Más respuestas (0)

Categorías

Más información sobre Spectral Measurements en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by