How to get coefficients of triangular functions in an expression

1 次查看(过去 30 天)
for example, X=k*sin(p1 + x*t) + c*sin(2*p1 + 2*x*t)
when I used 'coeffs' as:
[P, T]=coeffs(X,'sincos')
The result is:
P = k*sin(p1 + x*t) + c*sin(2*p1 + 2*x*t)
T =1
Actually, I want to get the coeffients of X as:
P=[k, c]
T=[sin(p1 + x*t), sin(2*p1 + 2*x*t)]
How can I do to get the desired result?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Specialized Power Systems 的更多信息

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by