how to add two loops
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
phoenix
am 10 Sep. 2017
Kommentiert: Andrei Bobrov
am 10 Sep. 2017
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.
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 10 Sep. 2017
t = 1:k;
c = t.^2.*exp(1i*t) + t.*exp(-1i*t);
1 Kommentar
Andrei Bobrov
am 10 Sep. 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);
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!