Error using * MTIMES is not fully supported for integer classes. At least one input must be scalar
Show older comments
I m traying to create an NMF algorithm (the multiplicative update rules) to decompose an image ento 2 matrix, but a message error apperas "Error using * MTIMES is not fully supported for integer classes. At least one input must be scalar" at line 5 . could u plz help me
V=imread('circuit.tif');
[m,n]= size(V);
for iter=1:Niter;
for W0 = rand (m,r);
H0 = h0.* (V*w0')./((w0'*w0)*h0 + (10^-9));
gradW = W*(H*H') - V*H';
gradH = (W'*W)*H - W'*V;
end
for h0=rand(r,n);
w0= w.*(V*h0')./(w0*h0*h0'+10^-9);
gradW = W*(H*H') - V*H';
gradH = (W'*W)*H - W'*V;
end
projnorm = ([norm(gradW(gradW<0 | W>0)); norm(gradH(gradH<0 | H>0))]);
if projnorm < tol*initgrad | iter == Niter | cputime-initt > timelimit,
fprintf('Iter = %d Final proj-grad norm %f\n', iter, projnorm);
break
end
W = W.*(V*H')./(W*(H*H'));
H = H.*(W'*V)./((W'*W)*H);
end
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!