I have a question regarding the minimization of a function, which is a summation of two separate functions, with a discrete list for one of the variables.
$S[a,c]= \sqrt{\sum_{b=0,4,8,12,16}{(f[b]-g[b,c,a])^2}} $
$f[b]$ is linear function with one variable , However $g[b,c,a]$ is a complex number function
and note that there are also constraints, $0<c<1$ and $0<a<5$
My question is, how do I first perform the summation then minimize the function $S[a,c]$ to optimize the variable $a$ and $c$ on the function.
Is there anyway I can used the NMinimize
option?
I tried using this built in operator and it gives me an error which says that the objects are of unequal length.
Any help regarding this problem would be appreciated.