I have an array of data I want to plot circular contour with those data

3 views (last 30 days)
I got Temperature =
200.00
199.94
199.85
199.71
199.51
199.26
198.96
198.60
198.18
197.72
197.20
as a column matrix. Now I want to plot circular contour whose Z value will change radially with given temperature.
For example: at radius=1 all Z values will be 200; For radius=2 all Z value will be 199.94....so on..
How to do that?
  2 Comments
darova
darova on 5 Mar 2020
Can you show your attempts? Do you know how the result should look like?
Sils_B
Sils_B on 5 Mar 2020
please see the .jpg file. and these contour should be concentric circle with uniform radial gap.

Sign in to comment.

Accepted Answer

darova
darova on 5 Mar 2020
Here is my solution
clc,clear
T = [200.00
199.94
199.85
199.71
199.51
199.26
198.96
198.60
198.18
197.72
197.20];
r = linspace(1,15,length(T));
t = linspace(0,2*pi,50);
%% SHORTER VERSION
[x,y] = pol2cart(t,1);
[Z,X] = meshgrid(T,x);
[~,Y] = meshgrid(T,y);
[R,~] = meshgrid(r,x);
subplot(121)
pcolor(R.*X,R.*Y,Z)
axis vis3d
%% MORE READABLE VERSION
[X,Y,Z] = deal( zeros(length(T),length(t)) );
for i = 1:size(X,1)
X(i,:) = r(i).*cos(t);
Y(i,:) = r(i).*sin(t);
Z(i,:) = T(i);
end
subplot(122)
pcolor(X,Y,Z)
axis vis3d

More Answers (0)

Categories

Find more on Contour Plots in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!