Hi everyone! I get this error message and I thought I might have forgotten a * sign, but apparently it isn't so. What could be wrong?
Main:
% fsolve caller
aaaa=fsolve(@(Z) base_montante(Z,vet_1_base_montante,vet_2_base_montante),-ex_1);
function with vector of equations:
function F = base_montante(Z,vet_1_base_montante,vet_2_base_montante)vet_3_base_montante=zeros(3,1);ex_1=[1; 0; 0];vet_3_base_montante(1)=Z(1);vet_3_base_montante(2)=Z(2);vet_3_base_montante(3)=Z(3);F=[dot(vet_3_base_montante,vet_1_base_montante); dot(vet_3_base_montante,vet_2_base_montante); dot(vet_3_base_montante,-ex_1)-1];
vet_1_base_montante , ex, and vet_2_base_montante are pre-assigned vectors, so it should solve for the 3 components of vet_3_base_montante…
Here's the complete error message, though only the first line should be the cause for it all:
Subscript indices must either be real positive integers or logicals.Error in @(Z)base_montante(Z,vet_1_base_montante,vet_2_base_montante)Error in fsolve (line 219) fuser = feval(funfcn{3},x,varargin{:});Caused by: Failure in initial user-supplied objective function evaluation. FSOLVE cannot continue.
Best Answer