Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: bsxfun do not subtract from same element and 1st column
Posted:
Mar 13, 2013 9:39 AM
|
|
"Mira " <psxgk@nottingham.ac.uk> wrote in message news:kho433$fvi$1@newscl01ah.mathworks.com... > hi guys, > > I have a D excel file (98 rows and 2 columns) and M file(17 rows and 2 > col). I need to find difference between 1st row and all rest, 2nd row and > all rest ..excluding those rows of which 1st column has same values as in > 2nd M file 1st column.
This description of what you're trying to do isn't very clear to me. Can you show a specific example with an 8-by-2 D and a 5-by-2 M? Let's say:
D = [1 2; 2 3; 3 4; 4 5; 2 6; 3 7; 5 8; 17 1] M = [1 8; 2 9; 5 13; 9 21; 3 2]
What do you expect the result to be for those two matrices, and how did you arrive at that result? Walk us through the process you'd use to solve that by hand and we might be able to tell you how to automate that.
-- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
|
|
|