필터 지우기
필터 지우기

can a function with no input arguments is possible to generate?

조회 수: 54 (최근 30일)
i want to call a function without any input arguments and in return i want some output. while trying to do that matlab shows an error like "attempt to execute script kf2() as a function"
here kf2() is the function that i want to call without any input arguments.

채택된 답변

Friedrich
Friedrich 2013년 5월 10일
Hi,
sounds like kf2 is NOT a function. It should be saved with the name kf2.m and should look like this:
function output = kf2()
output = 4;
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by