Happy Holidays Matlab Community. I have a programming question. I am trying to do minimization and need help coding it.
function my_function(a,b,c,d) % %calculations p, new_c, new_d and others % if condition1 return p; elseif condition2 my_function(a,b,new_c,d); else my_function(a,b,c,new_d); end end
I know return p; does not exist, only return/break to exit the loop. However, to my understanding, I would have to define p=my_function(a,b,c,d);
any tips on how to code this?