Surface plot for two variable piecewise function
10 ビュー (過去 30 日間)
古いコメントを表示
I need help plotting the following piecewise function in Matlab as surface plot. Any help is appreciated!!
x1 and x2 are [0,1]

3 件のコメント
回答 (1 件)
Dyuman Joshi
2023 年 10 月 21 日
9 件のコメント
Torsten
2023 年 10 月 21 日
編集済み: Torsten
2023 年 10 月 21 日
A bracket around 1/3 was missing. Should be
U = @(x1,x2) (1-exp(-5*(x1.^3+x2.^2).^(1/3))-(1-exp(-5))) .* (((x1.^3 + x2.^2) >= 0) & ((x1.^3 + x2.^2) <= 1)) + (x1.^3 + x2.^2 - 1) .* (((x1.^3 + x2.^2) >= 1) & ((x1.^3 + x2.^2) <= 2));
figure
fsurf(U, [ 0 1 0 1], 'MeshDensity',75)
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!