How can I ask for a question with questdlg and allow the user to rotate a figure at the same time?

29 ビュー (過去 30 日間)
Guillaume
Guillaume 2012 年 11 月 13 日
コメント済み: Walter Roberson 2022 年 5 月 19 日 3:41
Hello,
Here is my problem:
The user has to choose between two "3D figures", what he finds it is the best one. For example, if I create this function :
function answer = choosefig
Z1 = sin(1:0.1:3)' * cos(1:0.1:3);
Z2 = sin(0:0.1:2)' * cos(0:0.1:2);
figure('Name','Figure #1');
contour3(Z1);
figure('Name','Figure #2');
contour3(Z2);
answer = questdlg('What figure do you prefer?','Choose figure',...
'Figure #1','Figure #2','Figure #2');
end
I can't rotate the figures, to make my choice. I have to answer, before being able to control the display of the figures and choose if I prefer Z1 or Z2. I would like to be able to rotate figures, when choosing the figure.
Is there a solution to get round the problem?
Thank you,

採用された回答

Ilham Hardy
Ilham Hardy 2012 年 11 月 13 日
  1 件のコメント
Walter Roberson
Walter Roberson 2022 年 5 月 19 日 3:41
Currently-working link:
Title is "questdlg() with access to data cursor" and it is from Novemenber 2011.

サインインしてコメントする。

その他の回答 (3 件)

Guillaume
Guillaume 2012 年 11 月 15 日
In other words, I can't... Too bad. I'll continue with a pause before the questdlg, this is the simplest way I think.
Thanks for the link, I hadn't seen the topic before asking.
  1 件のコメント
Jan
Jan 2012 年 11 月 15 日
Please post comments as comments, not as an answer. Thanks.

サインインしてコメントする。


Jan
Jan 2012 年 11 月 15 日
Of course you can. It is only the standard version of questdlg which blocks the execution. But if you create your own version of a quest-dialog, or modify a copy of Matlab's questdlg, you can omit the modal state of the dialog window, wuch that you can rotate the 3D objects freely before to have to make your decision in the dialog.

Valentino
Valentino 2016 年 6 月 22 日
編集済み: Valentino 2016 年 6 月 22 日
As i had problems editing the standard questdlg, in this code you just have to Change WindowStyle from modal to normal and it works. Thanks to the author of that file. http://www.mathworks.com/matlabcentral/fileexchange/31044-specifying-questdlg-position

製品

Community Treasure Hunt

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

Start Hunting!

Translated by