In the following program, I get the value 200 X 1 after reshaping function, I want to store ground truth a label like 1 1 1 1 1 for the first five images then second 2 2 2 2 2 up to 40 images e.g.
1600x1 uint8 1
1600x1 uint8 1
1600x1 uint8 1
1600x1 uint8 1
1600x1 uint8 1
1600x1 uint8 2
1600x1 uint8 2
1600x1 uint8 2
1600x1 uint8 2
1600x1 uint8 2
.
.
1600x1 uint8 40
1600x1 uint8 40
1600x1 uint8 40
1600x1 uint8 40
1600x1 uint8 40
clc;
clear all;
faceData = cell(40,5);
for i=1:40
cd(strcat('s',num2str(i)));
for j=1:5
v=imread(strcat(num2str(j),'.bmp'));
v1 = imresize(v,[40,40]);
[x1,y1] = size(v1);
v1=v1(:);
w = uint8(v1);
faceData{i,j} = w;
end
cd ..
end
faceData = reshape(faceData,[],1);
6 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625315
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625315
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625346
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625346
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625491
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625491
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625511
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625511
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625535
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625535
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625545
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/425141-how-to-store-values-in-second-column-of-cell-array#comment_625545
Sign in to comment.