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
Stephen23 2019년 11월 21일
"Very strange situation."
Not very strange at all, your function syntax is incorrect:
function = Heat_Test()
% ^^

댓글을 달려면 로그인하십시오.

답변 (1개)

Henry Giddens
Henry Giddens 2019년 11월 21일
Your function definition is wrong. Try
function answer = Heat_Test()
answer = questdlg('quest')
end

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by