How can I modify the s-function for the XY-Graph in Matlab-Simulink so that it clear the graph periodically or provide a marker for the head of the graph?

5 ビュー (過去 30 日間)
I know that I can edit the s-Funktion for the XY-Graph in Matlab-Simulink and change it according to my needs, but I'm not much familiar with the programming of s-function, so does anyone know, how could I change the sfunxy.m to clear the graph periodically or provide a marker for the head of the graph? Thank you!

採用された回答

Mahfoud Alibrahim
Mahfoud Alibrahim 2017 年 5 月 11 日
編集済み: Mahfoud Alibrahim 2017 年 5 月 11 日
Hello, I found the following method, which could help:
you can edit the s-function for the XY-Graph in that you type the following instruction On MATLAB Command Window:
edit sfunxy.m
To provide the data-points with a marker you can do the following:
Go to the line(number about 239):
set(ud.XYLine, 'LineStyle','-');
and replace it with:
set(ud.XYLine, 'LineStyle','-', 'Marker','*');
To clear a part of the plot, go to the line (number about 396 in matlab 2015):
new_line = feval(@()hg2sample.ScopeLineAnimator('maxNumVertices',50000));
Here you can change the numbers of the 'maxNumVertices' to got the desired Display on the XY-Graph. For Exempel you can type 10 instead of 50000 to display just the last ten data-points in the XY-Graph.
Regards
Mahfoud

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by