"Marc" wrote in message <jlggou$2pq$
1...@newscl01ah.mathworks.com>...
I just noticed that your statement was size(phi,2), so that may not be your problem. Sorry.
I will have to check on my laptop when I have a second. Unless size( phi,2) returns 1 which I doubt.
Looking at this a second time, your problem may be that your functions haze two unknowns and require three variables. So fsolve is being given a function that requires 3 variables and you have only supplied two in your initial guess. Hence you get the return that your dimensions are off. If phi is not changing during your for loop, which appears to be the case from your code, albeit probably not your intention, you will have to rethink your approach.
Depending on how complex f1 and f2 are you may be able to use an anonymous function within a loop with your new 'phi' defined in front of the function still within the loop.
Something like this may work but I never know until I try...
for phi = 0.01:0.01:0.99
myfunc = @ myfunc(x) {f1(x(1),x(2),phi) ; f2(x(1),x(2), phi)};
fsolve (......)
end
Be careful assuming my syntax is correct as I am doing this from my tablet without Matlab in front of me.