[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cannot use ldegree() on symbolic expressions with non-integer expon
From: |
Jason Lewis |
Subject: |
Re: Cannot use ldegree() on symbolic expressions with non-integer exponents |
Date: |
Sat, 27 Mar 2010 08:37:21 -0400 |
I'm still confused about this one. I've searched the web and read the
documentation. Do I have a fundamental misunderstanding, or is this a
bug?
Thanks.
---------- Forwarded message ----------
From: Jason Lewis <address@hidden>
Date: Wed, 24 Mar 2010 11:52:32 -0400
Subject: Cannot use ldegree() on symbolic expressions with non-integer exponents
To: address@hidden
I'm a bit confused. The following code won't work:
> symbols
octave-3.2.3.exe:42:C:\Octave\3.2.3_gcc-4.4.0\bin
> x=sym("x")
x =
x
octave-3.2.3.exe:43:C:\Octave\3.2.3_gcc-4.4.0\bin
> y=x^2+9
y =
9.0+x^(2.0)
octave-3.2.3.exe:44:C:\Octave\3.2.3_gcc-4.4.0\bin
> ldegree(y,x)
error: power::ldegree(): undefined degree because of non-integer exponent
octave-3.2.3.exe:44:C:\Octave\3.2.3_gcc-4.4.0\bin
...but if I change the input as follows, it works fine:
> y=x*x+9
y =
9.0+x^2
octave-3.2.3.exe:45:C:\Octave\3.2.3_gcc-4.4.0\bin
> ldegree(y,x)
ans =
0.0
Why does x^2 become x^2.0 and x*x become x^2? How do I fix this problem?
Thanks,
Jason