極座標表示を3次元の円柱にしたいです。
17 views (last 30 days)
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
0 Comments
Accepted Answer
michio
on 27 Jun 2019
この辺が参考になりますでしょうか?円柱にした時に表面の色変化だけが表示できれば良いのか、それとも slice 関数を使って円柱内の温度変化を表示するのかなど考えられます。
0 Comments
More Answers (0)
See Also
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!