Using fminsearch I want to plot the model function whose parameters I'm fitting at each iteration without the figure window stealing focus. How do I do this?

Using fminsearch I want to plot the model function whose parameters I'm fitting at each iteration without the figure window stealing focus. How do I do this?

Answers (1)

Stop invoking whatever command it is (figure(), axes() ?) that you are using to bring the figure into focus. Calling the plot command alone would not be responsible for whatever it is you are seeing. It will not shift focus to the figure.

2 Comments

Not invoking figure() results in plotting to a new figure. But how do I plot to the same figure that I produced before invoking fminsearch?

Sign in to comment.

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Tags

Asked:

on 27 May 2020

Edited:

on 28 May 2020

Community Treasure Hunt

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

Start Hunting!