Very strange situation. By some reason the questdlg() does not work within a function:
6 次查看(过去 30 天)
显示 更早的评论
Very strange situation. By some reason the questdlg() does not work within a function:
function = Heat_Test()
answer = questdlg('quest')
end
Got result:
>> Heat_Test()
Error: File: Heat_Test.m Line: 1 Column: 11
Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.
Outside the function works normally
1 个评论
Stephen23
2019-11-21
"Very strange situation."
Not very strange at all, your function syntax is incorrect:
function = Heat_Test()
% ^^
回答(1 个)
Henry Giddens
2019-11-21
Your function definition is wrong. Try
function answer = Heat_Test()
answer = questdlg('quest')
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dialog Boxes 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!