Get coeffs of exponents

1 visualización (últimos 30 días)
Ohad Shapira
Ohad Shapira el 1 de Mzo. de 2021
Respondida: Sai Veeramachaneni el 5 de Mzo. de 2021
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]

Respuesta aceptada

Sai Veeramachaneni
Sai Veeramachaneni el 5 de Mzo. de 2021
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.

Más respuestas (0)

Categorías

Más información sobre Mathematics 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!

Translated by