MATLAB: How to use climate data e.g. rainfall in Cylindrical Coordinate System

cylindrical coordinate

% script for cylindrical coordinate system function which is written by % Robert Talbert
% Theta: change t1 and t2 to set starting and ending values for theta t1 =0; t2 = pi/2; theta = linspace(t1,t2);
% Radius : change r1 and r2 to set starting and ending values for theta r1 = -300; r2 = 300; r = linspace(r1,r2);
% create meshgrid for inputs %[theta,r] = meshgrid(theta,r);
[theta,r] = meshgrid(1:1:300,300:-1:1); % apply the fucntion to create a matrix of z value. change the function to % match what you want to plot
z = r *cos(theta);
% convert to cartesian and plot using mesh [x,y,z] = pol2cart(theta, r, z); mesh(x,y,z)

Best Answer

Script for this.