collect ten input matrix 784x1 and store it like 784x10 in matlab

Assuming you want to collect 10 input matrices each having a dimension of 784x1, you can initialize an array of size 784x10 and store each input matrix in a separate column of the array. Here is the code that achieves this:

main.m
% Initialize the output array of size 784x10
outputArray = zeros(784, 10);

% Loop through each input matrix
for i = 1:10
    % Collecting ith input matrix
    inputMatrix = input('Enter 784x1 input matrix: ');

    % Store the collected input matrix in ith column of the output array
    outputArray(:, i) = inputMatrix;
end
326 chars
12 lines

You can modify the prompt message inside the input function to suit your needs.

gistlibby LogSnag