Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Control the visibility of the parts of a piecewise function in plot with pushbutton

1 Ansicht (letzte 30 Tage)
Hallo,
I have a piecewise function such:
x=0:1:10;
s1=(x>=0 & x<=5);
s2=(x>5 & x<=10);
y(s1)=2.*x(s1)+5;
y(s2)=-2.*x(s2)+25;
plot(x,y)
and I need to control the visibility of its two parts. If I push the button a part disappears. If I push it back appears. How can I do that?
Thank you.

Antworten (1)

Giorgos Papakonstantinou
Giorgos Papakonstantinou am 30 Mai 2013
anyone please? ??

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by