How did I get this crazy Plot?
조회 수: 1 (최근 30일)
이전 댓글 표시
clc
clear all
close all
A = 1.9;
R = 10;
a = 1;
X = linspace(0.0001,0.1,100);
% Y = a.*(1 + (A^(-R))*(X.^(R-1)));
for i = 1:length(X)
Y(i) = a*(1 + (A^(-R))*(X(i)^(R-1)));
end
plot(X, Y)
If you run the above code you will get a weird plot like this (shown below).
- How come those many ones in the Y-axis?
- Instead of a straight line, How come the plot it is a curve?
- Could anybody please explain??*
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190491/image.jpeg)
댓글 수: 3
Guillaume
2018년 5월 11일
This is the plot I get (R2018a).
I see nothing unusual about it and I don't understand why you expect a straight line when you're effectively plotting y = c1*x.^9 + c2.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/188547/image.png)
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!