フィルターのクリア

How to plot 3d plane of type where one variable is missing like x + y = 0.....

1 回表示 (過去 30 日間)
Mesbahose Salekeen
Mesbahose Salekeen 2021 年 6 月 18 日
コメント済み: Mesbahose Salekeen 2021 年 6 月 18 日
x = -2:.05:2;
y = -2:.05:2;
[X,Y] = meshgrid(x,y);
now how do i define Z to relate with X,Y to create plane so i can do surf(X,Y,Z) ?

採用された回答

Matt J
Matt J 2021 年 6 月 18 日
編集済み: Matt J 2021 年 6 月 18 日
If you mean that you have a plane equation of the form a*x+b*y+0*z=d, then you can use
obj=planarFit.groundtruth([],[a,b,0],d);
obj.showfit
xlabel X, ylabel Y, zlabel Z
  1 件のコメント
Mesbahose Salekeen
Mesbahose Salekeen 2021 年 6 月 18 日
i figured an easy way now
t = linspace(-1,1,50);
x = t;
z = linspace(-5,5,50);
[X,Z] = meshgrid(x,z);
Y = X;
surf(X,Y,Z)
this will create planer surface of x - y = 0

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by