How to pass an argument to a function inside varfun?
7 ビュー (過去 30 日間)
古いコメントを表示
I'm using varfun to run functions on a table
varfun(@Foo, data_table);
The function has an additional argument "arg1" besides the table:
function Y = Foo(X, arg1)
Something like:
varfun(@Wrr, signals, fs);
Gives "Wrong number of arguments error". How can I pass the fs argument to the function inside varfun?
0 件のコメント
回答 (1 件)
Walter Roberson
2018 年 11 月 20 日
paramaterize the anonymous function
varfun(@(ss)Wrr(ss,fs), signals )
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Argument Definitions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!