フィルターのクリア

after getting the equation for a plane, solving for z

2 ビュー (過去 30 日間)
Brittany
Brittany 2011 年 8 月 1 日
I have three points that I am using to find the normal and then I have another point that I was using symbolically. After the code below, I need to be able to substitute in values for x and y in order to get z. I need help figuring out how to substitute for symbolic variables or what other function to use in order to be able to substitute but still keep the original expression.
start = [-13627.6 4904.1 1563.141];
middle = [-13630.9 4677.7 1562.681];
finish = [-13550.5 4593 1563.031];
>> normal = cross(start-middle, start-finish);
syms x y z
p = [x y z];
planefunction = dot(normal, p - start)
Z = solve(planefunction,z);

採用された回答

Paulo Silva
Paulo Silva 2011 年 8 月 1 日
use the subs function
or do like this
start = [-13627.6 4904.1 1563.141];
middle = [-13630.9 4677.7 1562.681];
finish = [-13550.5 4593 1563.031];
normal = cross(start-middle, start-finish);
syms x y z
p = [x y z];
planefunction = dot(normal, p - start)
Z = solve(planefunction,z);
x=1;y=1; %the values you want for x and y
z=eval(char(Z)) %now with x and y you can get z
  1 件のコメント
Brittany
Brittany 2011 年 8 月 1 日
subs works great. thanks!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by