Start plot at origin

10 visualizaciones (últimos 30 días)
Maxime
Maxime el 28 de Feb. de 2023
Editada: Voss el 2 de Mzo. de 2023
Hi, I made this graph but I don't know how I can make both plots start at the origin (0,0). So the starting point of Y needs to be zero.
plot(tv,gnegate(d(:,3)),'r'); hold on; plot(tv,(r),'b')

Respuesta aceptada

Voss
Voss el 28 de Feb. de 2023
Editada: Voss el 2 de Mzo. de 2023
data1 = gnegate(d(:,3));
data2 = r;
data1_plot = data1 - data1(1);
data2_plot = data2 - data2(1);
plot(tv,data1_plot,'r'); hold on; plot(tv,data2_plot,'b')

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by