How to draw a spiral with equidistant points in MATLAB

时间:2019-02-18 00:21:17

标签: matlab

I want to draw a spiral with equidistant points represented by a point matrix in MATLAB. Below is my code for spiral. However I need help for generating a matrix of equidistant points (50 units) on this spiral.

t = 1 : 1000; % A thousand points.
u = 0.50;
r0 = 50;
% Compute radius as a function of time.
r = r0 + u * t;
omega = 0.020;
phi0 = 5;
phi = -omega*t+phi0;
x = 500+r .* cos(phi);
y = 550+r .* sin(phi);
plot(x, y, 'LineWidth', 2);
grid on;

Best Regards

0 个答案:

没有答案