Basically i have a function that returns a column vector of size Z(100,1) of values. I want to run that function in a loop n times, and store each of those column vectors in a seperate index of an array, yet im having trouble doing this. This is my code that matlab does not like…
numSignals = 30;
Z = zeros(1,numSignals);
for n = 1:numSignals
% load signal of to be reconstructed
Z(1,n) = loadSignal(n);
end
You should probably use a matrix instead:
Then you can call back the column vector you want with
Matlab will not allow you to put anything other than a number into an entry of an array. If you really want the data structure you describe, then you will need to use a cell array instead. You can do this by