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

3 ビュー (過去 30 日間)
Sils_B
Sils_B 2020 年 3 月 5 日
コメント済み: Sils_B 2020 年 3 月 5 日
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 件のコメント
darova
darova 2020 年 3 月 5 日
Can you show your attempts? Do you know how the result should look like?
Sils_B
Sils_B 2020 年 3 月 5 日
please see the .jpg file. and these contour should be concentric circle with uniform radial gap.

サインインしてコメントする。

採用された回答

darova
darova 2020 年 3 月 5 日
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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by