MATLAB: How we can declare and initialize matrix of different name of same size in for loop

multiple matrix initialized in for loop

for i=1:5
vector+num2str(i)=zero(i:4);
end

Best Answer

Try this:
featureMatrix = zeros(numFeatures, numImages);
for k = 1 : numImages
% Analyze each image.....
thisFeatures = AnalyzeSingleImage(thisFilename);
% Put feature vector into column k.
% All feature vectors should have the same number of measurements.
featureMatrix(:, k) = thisFeatures;
end
Another option is you could use a structure array instead of a simple 2-D numerical matrix.