thank you for your answer Jan. I am talking about a UIfigure, trying to work with matlab's app designer. for a figure some dragabble solutions already exist. Is it possible to create a dragable axes in a uifigure? how? regarding my problems, I posted another problem here
my code is also attached there.