I want the right coding for ploting a horizontal line with sin wave
Mostrar comentarios más antiguos
Pl I want the code of plotting horizontal line with sin wave in the same figure
3 comentarios
John D'Errico
el 21 de Mzo. de 2021
Since this is surely homework, what have you tried? If nothing, why not?
- Surely you can you plot a sine wave?
- Can you plot a horizontal line? Hint, either use plot, or use yline.
If you will use plot to plot both of the curves, then you need to use hold on to force the second plot to overlay the first. But yline does not require you to use hold.
john m
el 21 de Mzo. de 2021
Respuestas (1)
Sergey Kasyanov
el 21 de Mzo. de 2021
Editada: Sergey Kasyanov
el 21 de Mzo. de 2021
Hello!
hold on
plot([x1,x2], [y,y])
Line starts in [x1, y] point and ends in [x2, y] point.
Categorías
Más información sobre Axis Labels en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!