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: bsxfun do not subtract from same element and 1st column
Replies: 1   Last Post: Mar 13, 2013 9:39 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Steven Lord

Posts: 17,526
Registered: 12/7/04
Re: bsxfun do not subtract from same element and 1st column
Posted: Mar 13, 2013 9:39 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"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




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

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