The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Combinations, iterations, indices and file names
Replies: 7   Last Post: Sep 19, 2009 9:13 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Paul Skvorc

Posts: 13
Registered: 2/6/07
Re: Combinations, iterations, indices and file names
Posted: Sep 19, 2009 12:07 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Matt Fig" <> wrote in message <h92t4v$9dh$>...
> "Paul Skvorc" <> wrote in message <h92r4o$3q7$>...
> > Why use a cell array?
> Because it simplifies your iterations issue:
> % Use three images here.
> C{1} = rand(5); % Use imread or whatever to fill the cell.
> C{2} = rand(5);
> C{3} = rand(5);
> T = nchoosek(1:3,2); % Indices for comparison.
> % Now the comparison, store in cell array (pre-allocation not shown).
> for ii = 1:size(T,1)
> G{ii} = C{T(ii,1)} > C{T(ii,2)}; % Silly comparison for illustration only.
> end

I'll give it a try and let you know.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.