passing a function with multiple inputs and multiple outputs to structfun

Hello I have a structure array test 1x6 with fields id name age
and i want to pass this to a function lets say testfunc if I were doing it in a for loop
for i = 1:length(test) [out1(i) out2(i)] = testfunc(test(i), Cities) end Cities is a static structure Cities.states = {'NY'..etc}
How do i do this without using a for loop I was trying to use structfun but that doesnt work
Thanks for your help

1 件のコメント

Shashank Prasanna
Shashank Prasanna 2013 年 8 月 22 日
why doesn't structfun work? Can you share you tried?

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

質問済み:

2013 年 8 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by