passing a function with multiple inputs and multiple outputs to structfun

1 Ansicht (letzte 30 Tage)
hdg D
hdg D am 22 Aug. 2013
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

Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by