How to i make the equivalent of the function scatter3 from matlab into Simulink ?
2 ビュー (過去 30 日間)
古いコメントを表示
Hello, I am trying to plot a 3d point map using Simulink.
I have the x,y,z coordinates each as a 1 column matrix and using the function "scatter3(x,y,z);" i can plot easily the 3d point map i need. However i want to do it using simulink. I have searched on the internet and so far i didn't found anything to be useful. I am new at using Simulink so any answer helps.
0 件のコメント
回答 (1 件)
Walter Roberson
2019 年 5 月 19 日
You can call scatter3() from a MATLAB Function Block in Simulink.
You will probably want to use persistent to remember the axes handle.
2 件のコメント
Walter Roberson
2019 年 5 月 19 日
When you use "from workspace" you are importing a timeseries. "from workspace" of a numeric array treats the first column as times, and the remaining columns as a vector of values to become available at that time. There are two settings for "from workspace": you can either use sample and hold so that the value associated with time T is held exactly as-is until the time comes around for the next time in the data -- or you can use interpolation, so at times between there is a linear interpolation of values between the times given in the data.
Remember that Simulink signals are expected to vary with time.
If you are not computing the points during simulation, then you should be asking yourself whether it is really suitable to be displaying them during simulation, or if you should instead be displaying something that was computed. Sometimes it makes sense to display something pre-computed, such as if it is serving as a background plot upon which you are going to overlay things that are computed.
Remember that MATLAB Function Block can contain load() or evalin('caller') or evalin('base')
参考
カテゴリ
Help Center および File Exchange で Sources についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!