フィルターのクリア

How to draw a radar search volume in 3D?

7 ビュー (過去 30 日間)
선호 백
선호 백 2024 年 2 月 5 日
コメント済み: 선호 백 2024 年 2 月 7 日
Hello,
I am a newbie trying to draw a 120-degree radar search volume in 3D without using syms. Any idea how?
https://kr.mathworks.com/help/symbolic/transform-spherical-coordinates-and-plot.html
syms phi theta
r = 4;
x = r*sin(phi)*cos(theta);
y = r*sin(phi)*sin(theta);
z = r*cos(phi);
fsurf(x,y,z,[0 pi/2 0 2*pi])
axis equal

採用された回答

Benjamin Kraus
Benjamin Kraus 2024 年 2 月 6 日
編集済み: Benjamin Kraus 2024 年 2 月 6 日
You are on the right track.
To start with, you can use fsurf without needing to use symbolic expressions, you just need to switch to using either anonymous functions or function handles.
r = 4;
x = @(phi, theta) r.*sin(phi).*cos(theta);
y = @(phi, theta) r.*sin(phi).*sin(theta);
z = @(phi, theta) r.*cos(phi);
fsurf(x,y,z,[0 pi/2 0 2*pi])
However, I don't think those are the right equations for what you want to draw.
I believe you want to fix phi and vary both r and theta. I believe this may be closer to what you are looking for.
Note that I switched x and z so that the cone was on it's side.
figure
phi = deg2rad(60);
x = @(r, theta) r.*cos(phi);
y = @(r, theta) r.*sin(phi).*sin(theta);
z = @(r, theta) r.*sin(phi).*cos(theta);
fsurf(x,y,z,[0 4 0 2*pi])
  3 件のコメント
Benjamin Kraus
Benjamin Kraus 2024 年 2 月 6 日
If this answered your question, can you click "Accept Answer"?
선호 백
선호 백 2024 年 2 月 7 日
Oh, didn't noticed that button.
Again, thanks a million!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by