Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

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

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

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$1@newscl01ah.mathworks.com>...

> 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]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.