Speeding up Plotting Lines Using the Mapping Package
9 ビュー (過去 30 日間)
古いコメントを表示
Hi, I've got a bunch of GPS data from runs of a car and want to plot it nicely on a map with delays between each point. I've tried using wmline in a loop plotting it piecewise, but it's very slow and hangs after plotting a few hundred points. Does anyone have any suggestions on speeding it up?
Plotting it as points also works as there's enough data for that to work but I don't want the big markers from the wmmarker command though the additional data would be useful (I've also got velocity, speed, heading, etc.). My mapping code is below:
for(i=2:size(lat,1))
wmline([lat(i-1,1)/10^7,lat(i,1)/10^7],[long(i-1,1)/10^7,long(i,1)/10^7]);
pause(0.1);
end
0 件のコメント
回答 (1 件)
Chad Greene
2017 年 8 月 22 日
編集済み: Chad Greene
2017 年 8 月 22 日
Why use a loop? You should be able to do
wmline(lat*1e-7,long*1e-7)
without any loops at all. If you must use a loop, you can speed it up by removing that 0.1 second pause each time through the loop.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!