f=@(X) fun1(x);data=arrayfun(f,xgroup);
about funtion 'fun1', now shall I return two result into the 'data' for one element of xgroup;
funtion re=fun1(x)....out1=x^2;out2=x^3;re=[out1 out2];end
When I do like above, Matlab cant accept it; so is there some method to return several results by one 'var'?
Best Answer