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?

4 次查看(过去 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 CenterFile Exchange 中查找有关 Simulink 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by