How can I plot a Sin or Cosine graph that looks this this?

1 visualización (últimos 30 días)
Elijah Barnhill
Elijah Barnhill el 8 de Feb. de 2020
Comentada: Steven Lord el 8 de Feb. de 2020
Would anyone know how to properly scale this graph and create it? It does not have to be the same color as the attached pictures.

Respuestas (1)

John D'Errico
John D'Errico el 8 de Feb. de 2020
Start with one of these:
help fplot
help ezplot
But before that, start by reading the getting started tutorials.
  2 comentarios
Elijah Barnhill
Elijah Barnhill el 8 de Feb. de 2020
>> v = cos(x);
>> t= sin(x);
>> x= [1.5:.5:6.5];\\ me trying to set the scaling of axis
>> y= [-1:.5:1];
>> plot (v);
I dont understand the issue... why does it come out like that and why wont the axis go to what i specify? The original photo my professor put up seems zoomed in yet gets the full wave.
Steven Lord
Steven Lord el 8 de Feb. de 2020
What does the documentation for the plot function say it uses as the X coordinates of the plotted points when you call plot with only one input? Open that documentation using the doc function.
Is there another way to call plot that lets you specify the X coordinates of the plotted points?
If you want to control the limits of the axes, use the axis, xlim, and/or ylim functions.

Iniciar sesión para comentar.

Categorías

Más información sobre Line Plots 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