just having some issues dividing all the values of a matrix by a scalar using MATLAB.
My code looked like,
ncol = length(indpic(1,:)); % ncol = 32
row0 = sum(indpic == 0,2); % 161 * 1 matrix
rowprob0 = 'row0' / 'ncol';
But the last line kept causing errors. I tried the following, but none of them worked either,
rowprob0 = 'row0' ./ 'ncol';
rowprob0 = 'row0' * (1/('ncol'))';
rowprob0 = 'row0' .* (1/('ncol'))';
I also attempted mucking around with this, but to even less avail,
ncol = length(indpic(1,:)); % ncol = 32
row0 = sum(indpic == 0,2); % 161 * 1 matrix
id_ncol_1 = eye(ncol,ncol);
id_ncol = (id_ncol_1).*(ncol);
rowprob0 = 'row0' / 'id_ncol';
If anyone can help me out, that'd be greatly appreciated :) cheers in advance