Plotting spiral pattern using MATLAB

MATLAB Codes:   clear; close all; clc  t = linspace(0,10*pi,1000);  x = t.*cos(t);  y = t.*sin(t);  z=linspace(0,2*pi,1000); plot3(x,y,z,'LineWidth',8) axis tight, grid on, view(35,30) c = 1:numel(t);       surface([x(:), x(:)], [y(:), y(:)], [z(:), z(:)], ...     [c(:), c(:)], 'EdgeColor','flat', 'FaceColor','none','LineWidth',8); colormap(jet(numel(t)))  colorbar saveas(gcf,'spiralPlot.png')

Powered by WordPress.com.

Up ↑

%d bloggers like this: