フィルターのクリア

real time 3D graph update

4 ビュー (過去 30 日間)
Natan Faigenbom
Natan Faigenbom 2020 年 6 月 16 日
コメント済み: darova 2020 年 6 月 20 日
Hello
lets say i have a 3D cylindrical shpae and it is multiplied by a parameter X.
what i want to do is to plot the cylindrical shape (i did it with surf) and to be able to change X in real time while the plot is showing, so that when i want i can make the cylindrical shape bigger and smaller by changing X with lets say a bar or a text input... but it's better if its continious.
is that possible?
what i am actullay tring to do is to change a model in real-time.
thank you

回答 (1 件)

darova
darova 2020 年 6 月 17 日
use pause
[x,y,z] = cylinder(20);
h = surf(x,y,z);
zlim([-2 2])
for i = 1:10
set(h,'zdata',z*sin(i));
pause(0.2)
end
  2 件のコメント
Natan Faigenbom
Natan Faigenbom 2020 年 6 月 19 日
Thanks I saw here that people said that using pause is less recomended... Why is that?
darova
darova 2020 年 6 月 20 日
Have no idea. Always using pause. Have never had a problem with that

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

カテゴリ

Help Center および File ExchangeSimulink Real-Time についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by