Search
MATLAB Central
File Exchange
MATLAB Newsgroup
Link Exchange
Blogs
Programming Contest
MathWorks.com
All of MathWorks.com
File Exchange
Newsgroup
Link Exchange
Blogs
Contest
MathWorks.com
Loren on the Art of MATLAB
Archive for January, 2009
Opportunity to Hunt for MathWorks Swag
January 26th, 2009
More Ways to Find Matching Data
January 20th, 2009
Nested Timing
January 6th, 2009
About
Loren Shure works on design of the MATLAB language at
The MathWorks
. She writes here about once a week on MATLAB programming and related topics.
Subscribe
Posts (e-mail)
Posts (feed)
Comments (feed)
Links
Blog archives
Technical Support
Categories
Best Practice
Blog Policies
Cell Arrays
Common Errors
Defaults
Deployment
Education
Efficiency
Fun
Function Handles
Graphics
Image Processing
Indexing
Interpolation & Fitting
Less Used Functionality
Memory
New Feature
Numerical Accuracy
parallel
Puzzles
Random
Readability
Robustness
Solving Equations
sparse
Strings
Structures
Tool
Travel
Uncategorized
Vectorization
Recent Comments
Jun
: I totally can not believe it, Loren. You are really helpful. Thank you so much, MATLAB master!
Loren
: Wow folks- Always lots of interest when there’s a quickie to try out! I will only make 2 general...
Loren
: Jun- ismember is your friend here: >> [aa,ind] = ismember(Array2,Arra y1) aa = 1 1 1 1 1 1 1 ind = 1 2 1 4 4 3...
Dan
: I like the first way better than the second way. Combining the arrays into one and running any is nice, although...
James Myatt
: How about I = (a == 0 | b == 0); a(I) = []; b(I) = [];
Tunc
: Hello Loren, love your blog because of such inspiring and challenging comments to such ’small’...
Pekka Kumpulainen
: Here is my tradeoff. I usually want to keep the original variables as they are most probably...
Iain
: Followup: Of course, to allow NaNs (counting them as non-zero): mask = (a~=0) & (b~=0); The mask says “a...
Matt Fig
: I would usually go with something like this: y = a&b; x = a(y); y = b(y); But I was surprised to find...
kk
: c=all([a;b]) a(c) a(b)
Blog Admin
Login
Dashboard
These postings are the author's and don't necessarily represent the opinions of The MathWorks.
Recent Comments