Prev: BMP to HEX File
Next: matlab and ajax
From: Matt J on 18 Mar 2010 11:55 "Hugh " <h_a_patience(a)hotmail.com> wrote in message <hnth1k$n78$1(a)fred.mathworks.com>... > > Hi Matt, > > I went to downlaod your fuinction but there seems to be alot of files associated with it (75 in all) do I have to install them all? I just want to do the calculation discussed in this thread? ================== Hi Hugh, The calculations discussed in this thread only require the single expression (B\R)/(C') It therefore probably wouldn't make sense to use KronProd if that's all you need, particularly with these small data sizes. (That is, unless you really, really like the trimmer syntax of KronProd.) If you were just hoping to cross-check (B\R)/(C') with something more fundamental, it would be enough to solve the system using the equation X(:)=kron(B,C)\R(:); If B and C were really large matrices then kron(B,C) could be a problem to compute and store and it would be sensible to use KronProd, but again your data sizes are so small... If you ever do have a use for KronProd (e.g. if you need to work with larger B and C) then you must install all 75 files. However, the installation procedure is really easy. Just unzip the @KronProd directory and put it in a parent directory that's already on the MATLAB path. There's no need to do anything else, certainly not to dump the 75 files individually somewhere where they're going to create a lot of clutter.
From: Matt J on 18 Mar 2010 12:42
Incidentally, a comparison between A=KronProd({B,C},[1,2]); X=A\R; %Version 1 and X=(B\R)/(C'); %Version 2 would not be valid. Internally, KronProd is implementing Version 1 almost exactly as in Version 2. The real comparison would be, as I said earlier, between Version 1 and X=kron(B,C)\R(:); %Version 3 |