Prev: slow class property access problem and solution
Next: Creating an EXE from Linux Version of Matlab
From: Matt Fig on 6 Aug 2010 21:27 You didn't say you wanted them all together! Here are a couple of approaches: % The FOR loop: Result = zeros(3); for ii = 1:3 Result(:,ii) = A(:,ii:3:9)*B(ii,:).'; end % For those who just MUST have a vectorized solution. Result2 = arrayfun(@(x) A(:,x:3:9)*B(x,:).',1:3,'Un',0); Result2 = cat(2,Result2{:}) % There are other approaches too ;-).
From: Jim on 6 Aug 2010 22:00 thanks matt. the world needs more ppl like you. best regards jimmy
From: Image Analyst on 7 Aug 2010 00:17 We do have quite a few Matts in this newsgroup, but the "Fig" version is one of the best.
First
|
Prev
|
Pages: 1 2 Prev: slow class property access problem and solution Next: Creating an EXE from Linux Version of Matlab |