Hi,
I am running a simulation program. in each simulation i have to use a number which i have to generate in a separate function.
The issue for me is can I call a function with out an INPUT and get the output.
Any small example code is highly appreciated!
dav

 採用された回答

Andy
Andy 2013 年 10 月 31 日

1 投票

Write the function you need and save it in the active directory or on the path i.e.
function [newnumber] = examplefunction
newnumber = rand;
end
From command window or in other m-file call the function by simply writing: -
x = examplefunction;

1 件のコメント

dav
dav 2013 年 10 月 31 日
thank you very much!!!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB Compiler についてさらに検索

質問済み:

dav
2013 年 10 月 31 日

コメント済み:

dav
2013 年 10 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by