How to Plot a graph with restriction?
73 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mustahsan Majeed
le 15 Sep 2014
Commenté : Mischa Kim
le 18 Sep 2014
Hi,
I am sorry I am new to MATLAB and dont know how to exactly formulate my quetsion.
I want to plot a graph between two variables but I want to restrict the plot area with a third varible. For example:
x = (0.5*pi:0.1:6*pi) y = sin(x)
Plot (x,y)
but now i want to restrict my plot with the following variable:
z = (pi:0.1;2*pi)
Note: The divisions are same for 'x' and 'z'.
Thanks, Mustahsan
0 commentaires
Réponse acceptée
Mischa Kim
le 15 Sep 2014
Mustahsan, what do you mean by restrict? Setting the plotting limits? Something like:
xlim([pi, 2*pi])
5 commentaires
Mischa Kim
le 18 Sep 2014
Use
plot(n(POS_thr>=95 & POS_thr<=100), M_ISO(POS_thr>=95 & POS_thr<=100),'or');
Plus de réponses (1)
Michael Haderlein
le 15 Sep 2014
Dear Mustahsan,
not sure if that's what you mean, but please check for
xlim([pi 2*pi])
Best regards, Michael
0 commentaires
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!