help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Convert symbolic answer to double gives me an error


From: RT
Subject: Convert symbolic answer to double gives me an error
Date: Tue, 11 Jul 2017 20:43:27 -0400

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'm use Octave 4.0 Ubuntu 16.04 64bit
symbolic *|   2.2.4 | /usr/share/octave/packages/symbolic-2.2.4  (from Ubuntu repos)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]