フィルターのクリア

Intersection of two linear lines in 3D

2 ビュー (過去 30 日間)
phoenix
phoenix 2019 年 7 月 22 日
コメント済み: Jon 2019 年 7 月 31 日
I have 3 data sets:A,B and C.I have plotted A vs B and C vs B. Now I want to plot a 3D graph which will represent the intersection of these two lines.How it can be done in Matlab,any help?

採用された回答

Jon
Jon 2019 年 7 月 22 日
編集済み: Jon 2019 年 7 月 22 日
It is a little hard to follow from your desription but I'm assuming you have 2 three dimensional curves that intersect.
So each curve is a set of points in 3-D space, where each point is given by an x,y and z coordinate value. Suppose you have m data points for each curve. Let the points in curve 1 be given by an m by 3 matrix, C1, where the first column is the x coordinate values, the second column is the y coordinate values, and the third column is the z coordinate values. Similarly let the points in the second curve be given by a m by 3 matrix C2 then you can use:
plot3(C1(:,1),C1(:,2),C1(:,3))
hold on
plot3(C2(:,1),C2(:,2), C2(:,3))
  7 件のコメント
phoenix
phoenix 2019 年 7 月 31 日
Thanks a lot @Jon. It worked.
Jon
Jon 2019 年 7 月 31 日
Very good. Glad you were able to get it working.

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by