Possible Duplicate:
How do I get the second return value from a function without using temporary variables?
As part of an attempt to do K-fold cross-validation, I'm trying to write an anonymous function that returns the 4th argument of another function.
Specifically, the function SVM returns five argument, and I want to create an anonymous function that picks out the fourth.
I thought this would work
Func1 = @(x) sum( SVM(x) .* [0, 0, 0, 1, 0] )
but sadly, it does not - it just returns the first argument.
Any ideas?
Thanks!