Plot in 3D over Time

14 ビュー (過去 30 日間)
Nicolas harfaut
Nicolas harfaut 2016 年 9 月 14 日
コメント済み: Star Strider 2016 年 10 月 10 日
Hi,
I need to make a 3D plot that change over time. I have 4 points which doesn't move in x and y, but z is moving through time. For exemple A(1,1,zA) B(1,2,zB) C(2,1,zC) and D(2,2,zD) and I have lots of values for zA, zB, zC, zD over time.
Who can I plot this in Matlab ?
Thank you for your answers.
Nicolas Harfaut

回答 (3 件)

Star Strider
Star Strider 2016 年 9 月 14 日
You can probably adapt this code to do what you want:
[X,Y] = meshgrid(linspace(-5, 5, 50));
fcn = @(x,y,k) k*x.^2 + y.^2;
v = [1:-0.05:-1; -1:0.05:1];
for k1 = 1:2
for k2 = v(k1,:)
surfc(X, Y, fcn(X,Y,k2))
axis([-5 5 -5 5 -30 50])
drawnow
pause(0.1)
end
end
  8 件のコメント
Nicolas harfaut
Nicolas harfaut 2016 年 10 月 10 日
Thank you so much
Nicolas
Star Strider
Star Strider 2016 年 10 月 10 日
My pleasure.
If my Answer solved your problem, please Accept it.

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


KSSV
KSSV 2016 年 9 月 14 日
clc; clear all ;
x = rand(4,1) ;
y = rand(4,1) ;
for i = 1:100
z = rand(4,1) ;
plot3(x,y,z) ;
drawnow
pause(0.2)
end

Nicolas harfaut
Nicolas harfaut 2016 年 9 月 15 日
Thank you for your answers, I wil look into it.
Nicolas Harfaut

カテゴリ

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