Using rat() heuristics for double-precision input (is this what you wanted?)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using rat() heuristics for double-precision input (is this what you wanted?)

murali129
when I ran the below script in octave-online, it has thrown some errors

warning : Using rat() heuristics for double-precision input (is this what
you wanted?)
error: operator =: no conversion for assignment of 'class' to indexed
'matrix'
error: assignment failed, or no method for 'matrix = class'

syms w0 w1;
w = [w0 w1];
eX = [ 1 0.8];
hX(0) = eX(1,:)*w





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

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Using rat() heuristics for double-precision input (is this what you wanted?)

Colin Macdonald-2
On 2017-08-31 07:42 AM, murali129 wrote:

> when I ran the below script in octave-online, it has thrown some errors
>
> warning : Using rat() heuristics for double-precision input (is this what
> you wanted?)
> error: operator =: no conversion for assignment of 'class' to indexed
> 'matrix'
> error: assignment failed, or no method for 'matrix = class'
>
> syms w0 w1;
> w = [w0 w1];
> eX = [ 1 0.8];
> hX(0) = eX(1,:)*w

Symbolic emits that warning when non-integer double-precision numbers
are converted to symbolic numbers.

Here I'd suggest "ex = [sym(1) sym(4)/5]" to avoid the warning.

The warning and associated docs have been much improved in the next
version of Symbolic.

Colin

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