nnmf function usage problem

2 Ansichten (letzte 30 Tage)
ihsan
ihsan am 11 Okt. 2012
hi all, i am trying to use nnmf function. i have a 3000x4000 sized variable named resim.it has all nonnegative values. i just wrote: [a,b]=nnmf(resim,100);
it gives an error just like this: Error using \ Linear algebra is not supported for integer data types. To compute elementwise LDIVIDE, use LDIVIDE (.\) instead.
Error in nnmf>nnmf1 (line 296) h = max(0, w0\a);
Error in nnmf/loopBody (line 258) [whtry{3},whtry{4},whtry{1}] = ...
Error in internal.stats.parallel.smartForReduce (line 128) reduce = loopbody(iter, S);
Error in nnmf (line 180) whbest = internal.stats.parallel.smartForReduce(...
do you have any idea what the problem is? thank you.

Akzeptierte Antwort

Tom Lane
Tom Lane am 12 Okt. 2012
Most Statistics Toolbox functions aren't written to operate on integer data types. Try nnmf(double(resim),100) to convert to double precision. You may be able to use single() instead, if double() needs too much memory.
  1 Kommentar
ihsan
ihsan am 12 Okt. 2012
thank you very much it worked, as you said it took many time for double but good for single.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu AI for Signals finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by