Effacer les filtres
Effacer les filtres

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

54 vues (au cours des 30 derniers jours)
jasaswini mohanty
jasaswini mohanty le 10 Mai 2013
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.

Réponse acceptée

Friedrich
Friedrich le 10 Mai 2013
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

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Coder 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