r = 12.5;
a = 0;
b = 0.01;
n = (r - a)./(b);
th = 2*n*pi;
Th = linspace(0,th,1250*720);
x = (a + b.*Th).*cos(Th);
y = (a + b.*Th).*sin(Th);
plot(x,y)
The code executes well r, a, n and b are correct. Th and th both are also correct, but the problem which arises is in the values of x and y.
outer value or last value (desired) should be 12.5, but after execution it gives 78.53 and same corresponds to y.
what can be the solutions of this problem?
5 Comments
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/485508-plotting-an-archimedean-spiral#comment_756616
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/485508-plotting-an-archimedean-spiral#comment_756616
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/485508-plotting-an-archimedean-spiral#comment_756617
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/485508-plotting-an-archimedean-spiral#comment_756617
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/485508-plotting-an-archimedean-spiral#comment_756618
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/485508-plotting-an-archimedean-spiral#comment_756618
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/485508-plotting-an-archimedean-spiral#comment_756622
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/485508-plotting-an-archimedean-spiral#comment_756622
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/485508-plotting-an-archimedean-spiral#comment_756771
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/485508-plotting-an-archimedean-spiral#comment_756771
Sign in to comment.