I am having a function f() this function is complicated function and its varialbles are epxi, beta, a1_t2, a2_t3, and xai. All of these variable are from 0 to 1. However, because some NaN problem, I decided to change it a little bit that is all the variable are from 0.1 to 0.9.
I want to evaluate my function f at all posible combination of epxi, beta, a1_t2, a2_t3, and xai to find out the max value effectively ( I have a multi-cores computer) but dont know how to do this.
Currently, my implemenation is quite naive and bad:
temp = f(epxi(c1),beta(c2),a1_t2(c3),a2_t3(c4),xai(c5);
Particularly, f() here is the function of interest. I store the evaluation to an array that keep expanding. The expanding array is the variable result.
Note that this function f is not a symbolic function.
I intended to use the built-in matlab function max on the result vector but I understand that this implementation is not efficient. I guess that some pre-allocation of the variable result would be more efficient but fail to do so.
Please help me with this !
Thank you for your enthusiasm !