Problem with simple division like Y./X
Afficher commentaires plus anciens
Hi,
I am plotting X Vs Y and trying to display X vs Y./X
I am not getting a symmetric plot about the origin.
x=-1:0.001:1;
y=1.5*x+0.5;
plotyy(x,y,x,abs(y./x));
Kindly let me know the solution to the problem.
best regards
Réponse acceptée
Plus de réponses (1)
Vishal Rane
le 27 Nov 2012
0 votes
As per ur data x ranges from -1 to +1. For those x values y ranges from -1 to +2.
Since y values are not symmetric, u wont get a symmetric plot for y vs x. However the values of abs(y./x) are somewhat symmetric around 0, resulting in the symmetric plot for y vs abs(y./x).
1 commentaire
Raj Gupta
le 28 Nov 2012
Catégories
En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
