how to calculat the sequence?

 Accepted Answer

KSSV
KSSV on 7 Jun 2021
Edited: KSSV on 7 Jun 2021
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))

More Answers (1)

kamal bouha
kamal bouha on 7 Jun 2021

1 Comment

I need a help for term in the right hand side, please

Sign in to comment.

Categories

Products

Release

R2016a

Tags

Asked:

on 7 Jun 2021

Commented:

on 7 Jun 2021

Community Treasure Hunt

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

Start Hunting!