MATLAB Answers

How to fill an array with the elements of a for loop?

2 views (last 30 days)
Hi, i have this code, and i want to put all of the elements from the loop inside an array, can anyone help me?
ll=[1 2 3 4 5]
for c= 1:1:length(ll)
%%result==>> ll= 4 5 6 7 8

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!

Translated by