what do '--' and '-.' mean? I'm new to using Matlab, and I came across this while looking at some examples.

 Respuesta aceptada

Adam Danz
Adam Danz el 25 de Sept. de 2020
Editada: Adam Danz el 25 de Sept. de 2020

0 votos

These are line styles.
Also check out the LineSpec input to the plot function.
plot(X,Y,LineSpec)

3 comentarios

Estefania Garcia
Estefania Garcia el 25 de Sept. de 2020
Thanks! Also do the values ([2:n]) mean?
where t = (0:160)';n = length(t);
Adam Danz
Adam Danz el 25 de Sept. de 2020
In the command window, type
help length
It tells you the length of t.
Now try
help :
Using the syntax 2:n, the colon operator counts from 2 and stop at or just before n by intervals of 1.
1.2 : 5
% ans =
% 1.2 2.2 3.2 4.2
Estefania Garcia
Estefania Garcia el 26 de Sept. de 2020
Thank you!!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 25 de Sept. de 2020

Comentada:

el 26 de Sept. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by