2D projection of 3D curve

117 ビュー (過去 30 日間)
Shafeo junejo
Shafeo junejo 2018 年 5 月 9 日
コメント済み: Naveen Pathak 2021 年 6 月 7 日
I am beginner and just know how to plot 3D and 2D seperately, but i want to plot complex exponential functions, that requires 3D curves with their 2D projections somewhat like the file attached, please help me.

採用された回答

Ameer Hamza
Ameer Hamza 2018 年 5 月 9 日
編集済み: Ameer Hamza 2018 年 5 月 14 日
The following code will give you an idea how to plot such a thing in MATLAB. You can run this code to draw a sample graph but mainly focus on last 3 lines since they are relevant for projection on a 2D plane.
y=0:0.1:80;
x = y/50.*cos(y);
z = y/50.*sin(y);
plot3(x,y,z, 'LineWidth', 2)
grid on
xlabel('x')
ylabel('y')
zlabel('z')
ylim([0, 100])
xlim([-2 2]);
zlim([-2 2]);
hold on
plot3(x, 100*ones(size(y)), z, 'LineWidth', 2); % project in x-z axis at y=100
plot3(2*ones(size(x)), y, z, 'LineWidth', 2); % project in y-z axis at x=2
plot3(x, y, -2*ones(size(x)), 'LineWidth', 2); % project in y-z axis at z=-2
  8 件のコメント
Jan
Jan 2018 年 5 月 15 日
@Shafeo junejo: If this answer solves your problem, please accept it.
Naveen Pathak
Naveen Pathak 2021 年 6 月 7 日
Hi Jan,
I have a simliar problem. Please, could you help me to understand how to do the following:
Thank you.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by