Effacer les filtres
Effacer les filtres

Linkdata + Brush Not Responding

3 vues (au cours des 30 derniers jours)
Adam
Adam le 6 Juin 2012
I want to delete data points from a plot using brush and remove. I want these points to be deleted from my workspace variables. I can't get it to work when I have any pause or waitfor commands afterwards. It works fine when nothing follows. This is part of my code:
>fig=plot(X,Y);
brush on
linkdata on
waitfor(fig)
fig2=plot(X,Y)

Réponse acceptée

Walter Roberson
Walter Roberson le 6 Juin 2012
What is your intention by using waitfor() ? waitfor() waits for the given object to be deleted.
If your intention is to give an opportunity for the user to do the brushing, then you would usually just return from the function at that point, having already established some control (e.g., 'Done' pushbutton) for the user to signal readiness to continue on.
  7 commentaires
Adam
Adam le 7 Juin 2012
It's almost there. Thanks. The only problem is X,Y are not being passed in the updated form from the brushing and deleting.
Adam
Adam le 7 Juin 2012
It all works now. Thanks. I used assignin in the first function for X and Y and evalin in the second function for X and Y.
I don't understand why it's not sending the right X and Y with the callback.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by