
Problem with simple division like Y./X
조회 수: 6 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Vishal Rane
2012년 11월 26일
This is the plot from the data u shared.
For plotyy(a1,b1,a2,b2)
b1 vs a1 is plotted on the left side while b2 vs a2 on the right

추가 답변 (1개)
Vishal Rane
2012년 11월 27일
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).
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!