How to plot portion of a vector in matlab?
Afficher commentaires plus anciens
Hi,
I am trying to plot a portion (from indis to length(vector)) of a vector (vector) in matlab using the following syntax:
plot(-vector(indis:length(vector))+1)
I don't know what indis will be, that's why my only option is to use indis in the plotting syntax. My issue is that matlab plots -vector(1:length(vector))+1 instead of plotting it as I demanded.
Please help me with this issue.
I would really appreciate your help.
Thanks.
2 commentaires
Azzi Abdelmalek
le 9 Fév 2013
What is indis ? What do you want to plot?
MatlabFan
le 9 Fév 2013
Réponse acceptée
Plus de réponses (1)
Azzi Abdelmalek
le 9 Fév 2013
Modifié(e) : Azzi Abdelmalek
le 9 Fév 2013
v=1:100
plot(v(40:end))
2 commentaires
Azzi Abdelmalek
le 9 Fév 2013
Modifié(e) : Azzi Abdelmalek
le 9 Fév 2013
You don't need length(vector). just write
y=1-vector(indis:end)
plot(y)
but you need to assign a value to indis
MatlabFan
le 9 Fév 2013
Catégories
En savoir plus sur Labels and Styling dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!