MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > Set interestions/Searching in large Matrices 

Subject: Set interestions/Searching in large Matrices From: Anthony Hopf Date: 26 Apr, 2010 12:30:11 Message: 1 of 14 
Ok, I posted a similar question a few weeks ago, but have determined that my old approach would have introduced unnecessary errors into my calculations. What I am trying to do now is set intersections/searching within a large matrix. I've created the following code to illustrate the issue... excuse the code for any inefficiencies in creating the matrices, it was hastily created. 
Subject: Set interestions/Searching in large Matrices From: Jan Simon Date: 26 Apr, 2010 14:02:21 Message: 2 of 14 
Dear Anthony! 
Subject: Set interestions/Searching in large Matrices From: Anthony Hopf Date: 26 Apr, 2010 14:32:20 Message: 3 of 14 
Jan, 
Subject: Set interestions/Searching in large Matrices From: Anthony Hopf Date: 26 Apr, 2010 17:23:05 Message: 4 of 14 
Jan, 
Subject: Set interestions/Searching in large Matrices From: Anthony Hopf Date: 26 Apr, 2010 20:02:05 Message: 5 of 14 
Ok, so I have been staring at this for awhile and still having trouble. The section of the code that really needs help is this: 
Subject: Set interestions/Searching in large Matrices From: Anthony Hopf Date: 27 Apr, 2010 11:41:03 Message: 6 of 14 
I had the big picture in mind when I posted this example code and I kept thinking about how I could do the resampling contingent on evaluating an inequality based on other indexing matrices. Speaking with one of my lab mates it had become clear that in doing the sampling this way I will see the same sampling errors I would if I just did a transform from cartesian coordinates to spherical, interpolate, and sample using evenly spaced indexes. 
Subject: Set interestions/Searching in large Matrices From: Bruno Luong Date: 27 Apr, 2010 11:54:04 Message: 7 of 14 
"Anthony Hopf" <anthony.hopf@gmail.com> wrote in message <hr6igf$2l5$1@fred.mathworks.com>... 
Subject: Set interestions/Searching in large Matrices From: Anthony Hopf Date: 27 Apr, 2010 12:44:05 Message: 8 of 14 
Bruno, 
Subject: Set interestions/Searching in large Matrices From: Bruno Luong Date: 27 Apr, 2010 14:05:23 Message: 9 of 14 
%Subsampled matrix 
Subject: Set interestions/Searching in large Matrices From: Bruno Luong Date: 28 Apr, 2010 06:44:05 Message: 10 of 14 
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message 
Subject: Set interestions/Searching in large Matrices From: Anthony Hopf Date: 5 May, 2010 12:36:05 Message: 11 of 14 
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <hr8lfl$3d9$1@fred.mathworks.com>... 
Subject: Set interestions/Searching in large Matrices From: Bruno Luong Date: 5 May, 2010 12:45:23 Message: 12 of 14 
"Anthony Hopf" <anthony.hopf@gmail.com> wrote in message <hrronl$sds$1@fred.mathworks.com>... 
Subject: Set interestions/Searching in large Matrices From: Anthony Hopf Date: 8 Jun, 2010 10:47:04 Message: 13 of 14 
Bruno, 
Subject: Set interestions/Searching in large Matrices From: Anthony Hopf Date: 8 Jun, 2010 11:21:04 Message: 14 of 14 
Here is the exact code I am using. My output is a sparse matrix (to conserve memory... there are many zeros... I use ~10% of the array for indexing) 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.