フィルターのクリア

how to make heatmap smooth?

47 ビュー (過去 30 日間)
ryunosuke tazawa
ryunosuke tazawa 2021 年 11 月 12 日
コメント済み: ryunosuke tazawa 2021 年 11 月 12 日
I want to make heatmap smooth, but cell edge can not be without.
Please tell me the way .
D1 = rad2deg(-4.71);
D2 = rad2deg(-3.14);
Theta_Theory = linspace(D2, D1, 10000);
Velocity_Theory = linspace(-100,0,10000);
figure(1);
[Theta_Theory, Velocity_Theory] = meshgrid(Theta_Theory, Velocity_Theory);
x1 = sin(Theta_Theory);
y1 = -cos(Theta_Theory);
T = sqrt(2*abs(y1)/9.8);
target = 10;
S_z = x1 + abs(Velocity_Theory.*cos(Theta_Theory)).*T.';
z = -abs(S_z -target);
h = pcolor(Theta_Theory, Velocity_Theory,z);
shading interp
set(h,'EdgeColor','none','linestyle','none');
colorbar;
colormap(jet(256));
  1 件のコメント
KSSV
KSSV 2021 年 11 月 12 日
As you are considering the angles in degrees, you should use sind and cosd

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

採用された回答

KSSV
KSSV 2021 年 11 月 12 日
D1 = -4.71 ;
D2 = -3.14 ;
Theta_Theory = linspace(D2, D1, 1000);
Velocity_Theory = linspace(-100,0,1000);
figure(1);
[Theta_Theory, Velocity_Theory] = meshgrid(Theta_Theory, Velocity_Theory);
x1 = sin(Theta_Theory);
y1 = -cos(Theta_Theory);
T = sqrt(2*abs(y1)/9.8);
target = 10;
S_z = x1 + abs(Velocity_Theory.*cos(Theta_Theory)).*T.';
z = -abs(S_z -target);
h = pcolor(Theta_Theory, Velocity_Theory,z);
shading interp
set(h,'EdgeColor','none','linestyle','none');
colorbar;
colormap(jet(256));
  1 件のコメント
ryunosuke tazawa
ryunosuke tazawa 2021 年 11 月 12 日
Thanks a lot. if I want to increased number of x and y values , should I do?
The error hapend " low-level graphics"
Theta_Theory = linspace(D2, D1, 1000);
Velocity_Theory = linspace(-100,0,1000);
Theta_Theory = linspace(D2, D1, 10000);
Velocity_Theory = linspace(-100,0,10000);

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by