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: speeding up assigning values to a matrix
Replies: 7   Last Post: Apr 8, 2013 3:52 AM

Advanced Search

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

Posts: 77
Registered: 6/6/12
Re: speeding up assigning values to a matrix
Posted: Apr 5, 2013 11:32 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"kinor" wrote in message <kjmptu$20a$>...

> Hi Luca,
> i guess your mask(:,:,:,3) = (mask>4 &mask<7)*255;
> should be maskC(:,:,:,3) = (mask>4 &mask<7)*255; ?

Yes, of course!

I'm going to try how faster your version is.
I would not expect reducing the number of scalar multiplications to provide great improvements.
You don't see either a way to use logical indexing, do you?

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.