help-octave
[Top][All Lists]

## Re: Must all coefficients for fsolve be numeric???????

 From: ttonon Subject: Re: Must all coefficients for fsolve be numeric??????? Date: Wed, 18 Mar 2020 11:52:24 -0500 (CDT)

```Thanks Doug.  I corrected the x problem and also realized I didn't supply
initial guesses for all the X variables.  But I'm still not there.  Here's
the code:

>> function y = f (X)
y = zeros (12, 1);
y(1) = Y_e*X(1)*sin(X(2)) +dStat*X(5)/2 + O;
y(2) = X(4) -X(3) + Og_o;
y(3) = X(7);
y(4) = X(1)*Tau^2*(Og_o + X(3))*X(4) +Cf*X(8);
---
---
---
y(50) = X(7) -X(26) -X(27) -X(28) -X(29) -X(30) -X(31) -X(32) -X(33) -X(34)
-X(35) -X(36) -X(37) -X(38);
y(51) = X(8) -X(39) -X(40) -X(41) -X(42) -X(43) -X(44) -X(45) -X(46) -X(47)
-X(48) -X(49) -X(50) -X(51);
endfunction
>> [X, fval, info] = fsolve
>> (@f,[0.1;0.01;1024;4.;-1.0;0.001;0.0;0.5;154.;71000;0.000007;0.000005;
0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0])
error: 'Y_e' undefined near line 3 column 8
error: called from
f at line 3 column 6
fsolve at line 236 column 8
>>

I'm pressed for time and so can't read all of the manual I should.  I

Tom

--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

```