極座標表示を3次元の円柱にしたいです。
Show older comments
現在、極座標を用いて色の変化で温度分布を二次元的に表示しているのですが、これにZ軸を加えた円柱の表示にしたいです。
Z軸方向にも温度変化があるので、例えば原点の温度からZ軸方向に1だけずれると-5℃変化したとして、Z=1のところの極座標をZ=0のところの
極座標から全体的に-5℃変化させた極座標を作成し、その間を補完するというようにしたいです。
以下に、極座標のコードを示します。
clear ;close all;clc
warning off;
n = 9;
r = (0:n)';
theta = pi*(-n:n)/n;
X = r*cos(theta);
Y = r*sin(theta);
C = -0.0444*(sqrt(X.^2+Y.^2)).^2 + 0.1857*sqrt(X.^2+Y.^2) + 3.55;
pcolor(X,Y,C);
%shading faceted
shading interp
%shading flat
view(0,200);
cb = colorbar;
cb.Label.String = 'Temperature, C';
axis equal tight
Accepted Answer
More Answers (0)
Categories
Find more on 極座標プロット in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!