フィルターのクリア

how to draw surface

6 ビュー (過去 30 日間)
Beyza Taka
Beyza Taka 2020 年 5 月 7 日
コメント済み: Ameer Hamza 2020 年 5 月 8 日
how do I write the program that draws the two-dimensional integral surface of the function in Matlab ?

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 5 月 8 日
編集済み: Ameer Hamza 2020 年 5 月 8 日
You can draw it using meshgrid and surf
[X, Y] = meshgrid(linspace(-3,3));
Z = exp(-X.^2-Y.^2);
surf(X,Y,Z)
shading interp
  9 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 5 月 8 日
I am glad to be of help.
Ameer Hamza
Ameer Hamza 2020 年 5 月 8 日
FYI, this is a faster version of the previous code in the comment
syms x y X Y
fun = matlabFunction(int(int(z,x,0,X),y,0,Y), 'Var', {X, Y});
[Xg, Yg] = meshgrid(linspace(0,2));
Z = arrayfun(fun, Xg, Yg);
surf(Xg,Yg,Z)
shading interp

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by