필터 지우기
필터 지우기

how to add two loops

조회 수: 2 (최근 30일)
phoenix
phoenix 2017년 9월 10일
댓글: Andrei Bobrov 2017년 9월 10일
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.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2017년 9월 10일
t = 1:k;
c = t.^2.*exp(1i*t) + t.*exp(-1i*t);
  댓글 수: 1
Andrei Bobrov
Andrei Bobrov 2017년 9월 10일
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);

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

KSSV
KSSV 2017년 9월 10일
p=1:1:k;
q=p;
x=p.^2*exp(j*p);
y=q.*exp(-j*q);
c=x+y;
  댓글 수: 1
phoenix
phoenix 2017년 9월 10일
dont i need any loop here?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by