x0 = zeros(1,12);% Values for w1
w_pool = 1:1:200;% Preallocate result matrix
x_all = zeros(numel(w_pool),numel(x0))% switch dispay off
options = optimoptions('fsolve','Display','off');% Call fsolve in a loop
%g=1e10;
%d3=1.25e7;
%d1=0.5*d3;
for k = 1 : numel(w_pool); %gs(k) = 10*((k-100)/100)*5e7;
%w3=gs(k);
h(k)=(((k-200)/200)+0.1) b=h(k);gs(k)=1eb;
I always get an error on the line where I try to calculate gs. I think this is a floating point error but I am not sure. Any help would be greatly appreciated!
Best Answer