フィルターのクリア

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

43 ビュー (過去 30 日間)
jasaswini mohanty
jasaswini mohanty 2013 年 5 月 10 日
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 Center および File ExchangeMATLAB Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by