MATLAB: How to use fsolve on a function, where not all input arguments are to be varied

fsolve

Hi there,
let me pose the question in code. Lets assume we have a function:
y = test(a,b)
where a and b are vectors. now I want to solve the function test using fsolve, but only varying a and keep the vector b constant.
fsolve(@test,x0,options,…)
Thanks for any help,
DKP

Best Answer

I found a rather simple solution.
I defined b as global and. That worked fine for me.