Very strange situation. By some reason the questdlg() does not work within a function:

6 vues (au cours des 30 derniers jours)
Sergey Lopatnikov
Sergey Lopatnikov le 21 Nov 2019
Commenté : Stephen23 le 21 Nov 2019
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 commentaire
Stephen23
Stephen23 le 21 Nov 2019
"Very strange situation."
Not very strange at all, your function syntax is incorrect:
function = Heat_Test()
% ^^

Connectez-vous pour commenter.

Réponses (1)

Henry Giddens
Henry Giddens le 21 Nov 2019
Your function definition is wrong. Try
function answer = Heat_Test()
answer = questdlg('quest')
end

Catégories

En savoir plus sur Dialog Boxes dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by