Get coeffs of exponents

2 次查看(过去 30 天)
How can I get the coeffs of exponents?
for example:
A=-1*exp(t*w*-1i)/2 + exp(t*w*1i)/2 - exp(t*w*2i)/2 + exp(t*w*-2i)/2
I want to get: [-0.5, 0.5, -0.5, 0.5]

采纳的回答

Sai Veeramachaneni
Hi,
You can use syms and coeffs.
Example:
syms t w i
A=-1*exp(t*w*-1i)/2 + exp(t*w*1i)/2 - exp(t*w*2i)/2 + exp(t*w*-2i)/2
coeffs(A)
Hope it helps.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by