How do I plot this graph on MATLAB?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Sudarshan
el 31 de Mzo. de 2018
Comentada: Hans Scharler
el 1 de Abr. de 2018
Dear all,
I am having difficulty in plotting this particular graph on MATLAB. I know that I am supposed to use an if and/or for statement in order to plot this graph, but, I am not able to figure it out. Any help would be appreciated. I will be attaching the graph for your reference. Thank you for your time.
Best regards Sudarshan.
1 comentario
Respuesta aceptada
Walter Roberson
el 31 de Mzo. de 2018
y = 50 * ones(size(t));
mask = t >= 0.2 & t <= 0.3;
y(mask) = -50;
mask = t >= 0.1 & t < 0.2;
y(mask) = 50 - (t(mask)-1/10) * 1000;
and so on.
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!