Plotting Space-Time Function in MATLAB?

How can I plot a function (x,y,t) like the following:
(max(ceil(max(0.8535533905932737,(0.5*(sin((5)*atan2(y,x)+2*PI*915.0e6*t+(3.141592653589793/2))+1)))-0.8535533905932737), 0))
in MATLAB and visualize how this function would change in time?

2 件のコメント

Geoff Hayes
Geoff Hayes 2019 年 5 月 4 日
Andong - how are x and y determined? What should the interval for t be?
Andong Yue
Andong Yue 2019 年 5 月 4 日
x,y form a mashgrid (a 2D space in this case, say, from -100 to 100 on each axis), t goes from, say, 0 to 1e-7. As t progresses, points on the mashgrid should evaluate to different values.

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

 採用された回答

Geoff Hayes
Geoff Hayes 2019 年 5 月 4 日

0 投票

Andong - I'm not sure if the below is exactly what you are looking for...when I tried it, it wasn't entirely obvious the changes over time (perhaps there aren't many?).
[X,Y] = meshgrid(-100:100,-100:100);
figure;
for t = 0:100
Z = (max(ceil(max(0.8535533905932737,(0.5*(sin((5)*atan2(Y,X)+2*pi*915.0e6*t+(3.141592653589793/2))+1)))-0.8535533905932737), 0));
plot3(X,Y,Z);
%view([-90 90]);
pause(0.05);
end

2 件のコメント

Andong Yue
Andong Yue 2019 年 5 月 4 日
Greff, you did not use the "hold on" command so the plot was over written every loop. Your answer was really close actually, I got the following plot with t = 100e-9:
1.jpg
which was what I expected. The only thing is that I want to see how the plot change in t in the form of an animation. Do you by chance know how to do that?
The shape is expected to rotate clockwise as t increases.
Andong Yue
Andong Yue 2019 年 5 月 5 日
Nevermind, I figured it out. Thanks for your help.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

製品

リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by