0
votes

Ok so my code puts out a couple of plots and then based on those plots the user is supposed to make some circuit changes and then based on those changes the matlab code is to proceed

here is what I did:

  1. Print out those plots
  2. put out a message dialog box asking user if they are ready to proceed with the code
  3. if input == yes in the dialog box --- proceed with the code

Here is the problem:

Once the dialog box is opened by matlab then I am unable to look at my plots as the message box is persistant and stays on top of all the plots until I either close it or enter the input.

This is a problem because i need to be able to look at these plots and dont want to close the box.

Is there a way of making this box non persistent?? or what are my other option ??

PS

I tried putting in a pause(30) 30 second pause after printing the plots and putting up the dialogue box. The problem is that I need variable amount of time to fix my circuit. Sometimes 10 seconds - sometimes 5 minutes. So pause solutions isn't very effective

1
how do you create the dialog?Rody Oldenhuis

1 Answers

1
votes

If you rely on questdlg (or similar), there is no mechanism that allows you to do what you want. If you look at edit questdlg, you see that the figure is hardcoded to 'Modal', and uiwait is called, which halts input until one of the button callbacks runs uiresume. There is no way to control this behavior (nor should there be).

I see two ways out:

  1. Copy questdlg.mquestdlg_nonmodal.m and make necessary changes
  2. Create buttons on one or all of your plots, with the same callbacks as the dialog buttons.

Personally, I'd go for option 2, but I don't know your situation or preferences.