Info

此问题已关闭。 请重新打开它进行编辑或回答。

I'm having trouble using MsgBox.

1 次查看(过去 30 天)
Muhendisleksi
Muhendisleksi 2017-4-20
关闭: MATLAB Answer Bot 2021-8-20
kontrl = -4.796163466380676e-14
if -0.001<=kontrl & kontrl>=0.001
h=msgbox({'Dengeli Ölçülerin Denetimi' 'BAŞARILI!!!'},...
'Kontrol','custom',myicon);
elseif errordlg({'Dengeli Ölçülerin Denetimi' ' HATALI!!!'},'Hata');
end
"Conversion to logical from matlab.ui.Figure is not possible." I get this error.
  2 个评论
Walter Roberson
Walter Roberson 2017-4-20
What is class(myicon) ?
Also, please put in a breakpoint at the "if" and query class(kontrl)

回答(1 个)

Greg
Greg 2017-4-20
elseif errordlg({'Dengeli Ölçülerin Denetimi' ' HATALI!!!'},'Hata');
I believe you wanted:
else
errordlg({...},'Hata');
  2 个评论
Greg
Greg 2017-4-20
Which also means you aren't having any trouble using MsgBox as your question title states. You're having trouble using elseif.
Muhendisleksi
Muhendisleksi 2017-4-20
I still have the same problem.

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by