How to plot the data array in dynamic?
显示 更早的评论
Each time a data packet is received,you need update the data display,data packet length is about eighty.
8 个评论
KSSV
2018-6-11
It can done with plot and set..what problem you face?
Qingying Tu
2018-6-11
Walter Roberson
2018-6-11
That depends upon how complicated the graphic is and how much additional information you are adding to the display each time.
Qingying Tu
2018-6-11
Walter Roberson
2018-6-11
How quickly are you sending data packets? How are you checking for data packets? What graphics are you doing?
Qingying Tu
2018-6-12
编辑:Walter Roberson
2018-6-12
Walter Roberson
2018-6-12
You need to preallocate y. You are adding more memory to y every iteration of "i".
Walter Roberson
2018-6-12
Note that at 0.4ms per packet, that you would be trying to process 2500 packets per second. For each packet you process, you try to do a graphics update. Unless your graphics display can handle 2500 frames per second, your graphics system is not going to be able to keep up.
If you want real-time graphics updates, you should gather together data corresponding to (say) 50 frames per second (so about 500 packets) and only update the graphics object once per group. That is about 500*81 which is over 40000 points per frame, and even if you have a super wide monitor you will never be able to display that many points per frame. So you need to decide how you want to update your display when the number of data points you receive per second is considerably more than the number of data points you can display per second.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Animation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!