# symbolic pkg help for degree

6 messages
Open this post in threaded view
|

## symbolic pkg help for degree

 Function File: n = degree (p)Function File: n = degree (p, x)Extract numerator and demoninator of symbolic expression.Examples:```syms x degree(x^2 + 6) ⇒ (sym) 2```This function does not "extract numerator and denominator from"It finds the highest power of a variable. -- DAS
Open this post in threaded view
|

## Re: symbolic pkg help for degree

 On Sun, 2016-01-03 at 09:54 -0500, Doug Stewart wrote: > > Function File: n = degree (p) > Function File: n = degree (p, x) > Extract numerator and demoninator of symbolic expression. > Examples: > syms x > degree(x^2 + 6) >    ⇒ (sym) 2 > > > This function does not "extract numerator and denominator from" > It finds the highest power of a variable. Well, it returns the degree of the numerator polynomial, which is two. In this example, there is no denominator polynomial defined (note the spelling, the help text is wrong!)
Open this post in threaded view
|

## Re: symbolic pkg help for degree

 On Jan 3, 2016 10:09 AM, "Svante Signell" <[hidden email]> wrote: > > On Sun, 2016-01-03 at 09:54 -0500, Doug Stewart wrote: > > > > Function File: n = degree (p) > > Function File: n = degree (p, x) > > Extract numerator and demoninator of symbolic expression. > > Examples: > > syms x > > degree(x^2 + 6) > >    ⇒ (sym) 2 > > > > > > This function does not "extract numerator and denominator from" > > It finds the highest power of a variable. > > Well, it returns the degree of the numerator polynomial, which is two. > In this example, there is no denominator polynomial defined (note the > spelling, the help text is wrong!) > This seems to be attempting to emulate the MATLAB mupad function degree which is not defined for rational polynomials. According to the help for that function it returns the degree of the symbolic polynomial. It certainly seems like it could be extended for rational polynomials, but I'm not sure if that's the intent here.
Open this post in threaded view
|

## Re: symbolic pkg help for degree

 On Jan 3, 2016 4:38 PM, "Nicholas Jankowski" <[hidden email]> wrote: > > > On Jan 3, 2016 10:09 AM, "Svante Signell" <[hidden email]> wrote: > > > > On Sun, 2016-01-03 at 09:54 -0500, Doug Stewart wrote: > > > > > > Function File: n = degree (p) > > > Function File: n = degree (p, x) > > > Extract numerator and demoninator of symbolic expression. > > > Examples: > > > syms x > > > degree(x^2 + 6) > > >    ⇒ (sym) 2 > > > > > > > > > This function does not "extract numerator and denominator from" > > > It finds the highest power of a variable. > > > > Well, it returns the degree of the numerator polynomial, which is two. > > In this example, there is no denominator polynomial defined (note the > > spelling, the help text is wrong!) > > > > This seems to be attempting to emulate the MATLAB mupad function degree which is not defined for rational polynomials. According to the help for that function it returns the degree of the symbolic polynomial. It certainly seems like it could be extended for rational polynomials, but I'm not sure if that's the intent here. Additionally, what the heck is MuPAD?  MATLAB seems to treat it as some stand alone program not part of core MATLAB or the core symbolic toolbox. Is it inside the scope that Octave tries to maintain compatibility with?