Hi, I’m trying to express the NLobjective of a problem which is something like this : sum((A*v_j -v_exp)^2) (A is a matrix)
I tried different forms and I got error in each case
#@NLobjective(model,Min,sum((dot(module_flux[j,:],v[indx_of_P2])-measured_flux_of_modules[j,3])^2 for j in 1:size(measured_flux_of_modules,1)))
@NLobjective(model,Min,sum((module_flux[1,:]'*v[indx_of_P2]-measured_flux_of_modules[2,3])^2 for j in 1:size(measured_flux_of_modules,1 )))
this is the error for each of the above code:
and for this one :
@NLobjective(model,Min,sum((module_flux*v[indx_of_P2]-measured_flux_of_modules[:,3]).^2 ))
I think I’m doing what the last error says in the other two versions of code, but as you see that error come up