Draw 1 hyperboloid with equation -0.2x^2 - 0.2y^2 +z^2 =1 with colormap jet

1 回表示 (過去 30 日間)
non non
non non 2023 年 4 月 13 日
編集済み: Davide Masiello 2023 年 4 月 13 日
I want to make it very succinct, but it doesn't seem to work

回答 (1 件)

Davide Masiello
Davide Masiello 2023 年 4 月 13 日
編集済み: Davide Masiello 2023 年 4 月 13 日
[x,y] = meshgrid(linspace(-10,10,100));
z = sqrt(1+0.2*x.^2+0.2*y.^2);
Then you can plot it in many ways. Examples
figure(1)
contourf(x,y,z)
colormap(jet)
colorbar
axis equal
figure(2)
surf(x,y,z)
colormap(jet)
colorbar
figure(3)
surf(x,y,z,'EdgeColor','none'), hold on
surf(x,y,-z,'EdgeColor','none')
colormap(jet)
colorbar
axis equal

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by