for loop index picking only elements of given vector

3 views (last 30 days)
Hi all,
I am trying to see the loop index j only picking the element of given vector V.
for example for index j can pick value 1, 4, 8, 11 and so on.
Expecting your help.
Thanks
Dharma
syms x t
c(1)=10*dirac(x-1);
V=[1 4 8 11 15 18 22];
for j= .....%it needs to pick only elements of above vector V
c(x)=c(x)+dirac(x-j);
end

Accepted Answer

Voss
Voss on 7 Aug 2022
for j = V
  2 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!