0

Say i have an expression as such in MATLAB:

syms x
y = x^(-5/2)

I would like to find the degree/exponent of x, which is (-5/2). it is possible for polynomials in matlab but how can it be done for non-polynomial as above?

Thanks

arvindrajan92
  • 159
  • 2
  • 9
  • It is a good practice to mention if you have cross-posted this question somewhere else. Anyways, my conclusion is same as [this](http://www.mathworks.com/matlabcentral/answers/141853-find-degree-of-non-polynomial-expression-in-matlab) answer's. As of now, it is not possible. – Autonomous Jul 15 '14 at 02:55
  • Do you at least know the pattern of your exponents. By that I mean, will they always have 2 in the denominator? This is where I am getting at: if you do `y^-2`, you can find the degree. So I am thinking, if you can use `try-catch` in a for-loop which raises `y` to some sequence of powers, till you can find the degree. But you can't keep using `try-catch` and moreover, this will be a terrible solution. – Autonomous Jul 15 '14 at 03:09
  • yes, i posted it there too @ParagS.Chandakkar. this is what i want to do. say i have y = x^(-2/5) + xz^(3), i want to extract every monomial such that m = {x^(-2/5),xz^(3)}. only then extract the degree which is (-2/5). in this case, i cant do the very first step, which is to extract the monomials – arvindrajan92 Jul 15 '14 at 03:41
  • I think it is not possible. You can only find if you do `x^(-(2/5))^k`. Your task is to find correct value of `k`. It is not possible to do it in an efficient and concise manner currently, I think. – Autonomous Jul 15 '14 at 05:00
  • unfortunately yes @ParagS.Chandakkar – arvindrajan92 Jul 15 '14 at 05:37

0 Answers0