How can I extract coefficients in terms of variables out of an expression in Matlab?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mirroyal Ismayilov
el 25 de Jul. de 2018
Comentada: Mirroyal Ismayilov
el 25 de Jul. de 2018
I need to return coefficients of variable from an expression or polynomial. Actually, in Maxima I was using ratcoef(exp,var) . I need exactly same work in MATLAB.
0 comentarios
Respuesta aceptada
Walter Roberson
el 25 de Jul. de 2018
If your expression is symbolic, see sym2poly() and see coeffs()
If your expression is not a polynomial then getting the coefficients can be more difficult. For example neither sym2poly() nor coeffs() can extract the pi/7 of sin(pi/7*x)
Más respuestas (0)
Ver también
Categorías
Más información sobre Polynomials en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!