how to write this in matlab. c=x+y; where x=p^2*e^j*p and y=q*e^(-j*q); p,q ranges from 1:1:k.

 Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 10 de Sept. de 2017

0 votos

t = 1:k;
c = t.^2.*exp(1i*t) + t.*exp(-1i*t);

1 comentario

Andrei Bobrov
Andrei Bobrov el 10 de Sept. de 2017
t = 1:k;
p=(2*t.^2+t+1)';
q=(2*t.^2+3*t+2)';
c = p.^2.*exp(1i*p) + q.*exp(-1i*q);

Iniciar sesión para comentar.

Más respuestas (1)

KSSV
KSSV el 10 de Sept. de 2017

0 votos

p=1:1:k;
q=p;
x=p.^2*exp(j*p);
y=q.*exp(-j*q);
c=x+y;

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 10 de Sept. de 2017

Comentada:

el 10 de Sept. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by