
f(x,y)<=0
3 ビュー (過去 30 日間)
古いコメントを表示
How can I plot this function in 3D-Oxyz? Can somebody give me some advices? Thanks
0 件のコメント
回答 (1 件)
KSSV
2020 年 6 月 29 日
編集済み: KSSV
2020 年 6 月 29 日
It depends on what your function f is. Your function f will show some relation between x and y. Also you should define range of x and y. Checl the below demo example.
% DEfine x, y
x = linspace(-1,1) ;
y = linspace(-1,1) ;
% Make a grid
[X,Y] = meshgrid(x,y) ;
% define the function
f = X+Y ;
z = NaN(size(f)) ;
z(f<=0) = f(f<=0) ; % make other value NaN
surf(X,Y,z) % plot
shading interp
colorbar

2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!