Fitzgerald Brooks
Fitzgerald Brooks

Reputation: 33

Creating a 1-dimensional array without specifying the array elements and the array length in Matlab

Is it possible to create a 1-dimensional array without initializing the array elements and the array length in Matlab?

Upvotes: 0

Views: 50

Answers (1)

Juan David Navarro
Juan David Navarro

Reputation: 11

I usually create the empty array first, say

array=[];

and then append the results, for instance:

for cont = 1: 10
  array=[array,cont];
end

Upvotes: 1

Related Questions