3d Curve for 3 vectors

1 回表示 (過去 30 日間)
ola watad
ola watad 2023 年 4 月 27 日
編集済み: Matt J 2023 年 4 月 27 日
hello,
i have a set three data vectors :
x=(datax)
y=(datay)
z=(dataz)
plotting the vectors with plot3d derives the green line displayed in the attached picture.
I want to connect the the point with a smooth curve (on axis z), not a surface,is there a way to do that ?
curve fitting did work fo me.
Thanks in advance
  2 件のコメント
Matt J
Matt J 2023 年 4 月 27 日
編集済み: Matt J 2023 年 4 月 27 日
curve fitting did work fo me.
Is your question why curve fitting didn't work? We cannot know without seeing your steps, and how you evaluated the result.
ola watad
ola watad 2023 年 4 月 27 日
My question is how to draw the line My be i did not preform curve fitting right i would like to have any suggestions

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

回答 (1 件)

Matt J
Matt J 2023 年 4 月 27 日
編集済み: Matt J 2023 年 4 月 27 日
Data=[x(:).';y(:).';z(:).'];
w=width(Data);
XYZ=num2cell(spline(1:w,Data,linspace(1,w,10*w)),2);
plot3(XYZ{:});

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by