Coeffs of non linear product terms
조회 수: 7 (최근 30일)
이전 댓글 표시
I need to find coefficient of a product term in a symbolic expression. An exaple is:
syms x y
[c, v] = coeffs(x+y+2*x*y,x*y);
But this code gives an error: Error in MuPAD command: The indeterminate is invalid. [coeff]
I know that if I write
[c, v] = coeffs(x+y+2*x*y,[x,y]);
then the first term will be the coefficiet of product term, but I need to get the coeff of only the product term. Also, I'm concerned about execution time, so I want to do it in minimum possible lines. I dont want to use an if loop to check which element in c is the product term. Does anyone know how I can possibly find the coefficient of a specific product term.
댓글 수: 0
채택된 답변
추가 답변 (1개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!