for ii = 1:numel(stats);
m(ii) = mean(stats(ii).PixelValues);
s(ii) = std2(stats(ii).PixelValues);
skewww(ii) = skewness(double(stats(ii).PixelValues));
kurtooo(ii) = kurtosis(double(stats(ii).PixelValues));
end
Fuse_Data=horzcat(m(:),s(:),skewww(:),kurtooo(:));
Error: Error using horzcat
Dimensions of matrices being concatenated are not consistent.
I use Fuse_Data
as features extracted and uses as input for NN training. But I am unable to concatenate this.
When I use the whos
command to inspect the variables, these are the results:
Name Size Bytes Class
m 845x1 6760 double
s 1x1079 8632 double
skewww 1x1079 8632 double
kurtooo 1x1079 8632 double
m
doesn't have the same number of elements as the other variables you're trying to concatenate... I suggest you initialise your variables before the loop withm = zeros(numel(stats),1); s = zeros(...)
etc, because the most likely solution is that you ran this before with a largerstats
variable, and never cleareds
/skeww
/kurtoo
. Or simplyclear
before you run the code. – Wolfie