필터 지우기
필터 지우기

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?

조회 수: 1 (최근 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에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by