On Tue, Jul 11, 2017 at 20:43:27 -0400, RT wrote:

> I can get the answer using symbolic package in octave but when I go to

> convert them back to doubles I get an error see code and error below.

> (Thanks to Mike Miller for getting me this far)

>

> pkg load symbolic

> syms a b

>

> assume(a, 'positive')

> assume(b, 'positive')

> x1=2;y1=12;

> x2=8;y2=768;

> sol = solve (y1==a*b^x1, y2==a*b^x2, a, b)

> a_val=double(a)

> b_val=double(b)

>

> I get an error

> error: cannot convert to double

> error: called from

> double at line 126 column 7

> test_symbolic at line 12 column 6

I think you want

a_val = double (sol.a)

b_val = double (sol.b)

right?

--

mike

_______________________________________________

Help-octave mailing list

[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave