can a function with no input arguments is possible to generate?
45 次查看(过去 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.
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!