I have created a function on matlab dependent on three variables, say:
I have a vector of values for x, let's call it A. My goal is to estimate function:
So what I am looking for is a Matlab command which will allow me to calculate f(x,y,z) for each value of vector A, and then sum them together. Here are a few things I have tried that failed:
g = @(y,z) cumsum(f(A,y,z))
I have checked and the issue lies in estimating f(A,y,Z), which immediately turns all values to 0. I know that a possible alternative to this is doing a manual sum of f(a_1,y,z) + f(a_2,y,z) etc, but there are 175 different numbers in vector A and coding this manually would take forever. Does anyone have any other ideas?