Which command can tell me my function degree ?

Hi ; I have a problem with my function.
I want to learn its highest degree.
My function is like f(r,s) = a*r^2+b*r*s+c*s^3
for example this functions highest degree for s variabla is 3 and highest degree for r variable is 2.
How can I write a command which returns me the highest degree for r or s variable ?
Thank you

댓글 수: 1

How have you tried? No one will serve a code to you on a silver plate.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2013년 2월 27일

0 개 추천

If you have the function in symbolic form, then you can use coeffs() from the symbolic toolbox.
If you do not have the function in symbolic form, if all you have is a function handle that can be evaluated, then NO, it is not possible to determine the maximum degree.

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

질문:

2013년 2월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by