채택된 답변

KSSV
KSSV 2021년 6월 7일
편집: KSSV 2021년 6월 7일

1 개 추천

u = rand(1,100) ; % data for demo
k = 20 ;
thesum = 0 ;
for j = 1:k-1
thesum = thesum+sqrt(k-j)*u(j) ;
end
You can achieve the same without loop using:
j = 1:k-1 ;
iwant = sum(sqrt(k-j).*u(j))

추가 답변 (1개)

kamal bouha
kamal bouha 2021년 6월 7일

0 개 추천

댓글 수: 1

kamal bouha
kamal bouha 2021년 6월 7일
I need a help for term in the right hand side, please

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

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

릴리스

R2016a

태그

질문:

2021년 6월 7일

댓글:

2021년 6월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by