Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
identify similarly repeated rows

Subject: identify similarly repeated rows

From: ben

Date: 10 Oct, 2010 20:38:03

Message: 1 of 2

Good day everyone,

Would like some assistance in finding repeated rows in the following matrices:

A = [ 27 89;
         76 44;
         10 3;
         11 99;
          5 6]

B = [ 11 19;
         76 44;
         16 72;
         11 99;
         54 61;
         65 11]

C = [ 27 89;
         10 3;
         11 99;
          5 6;
          32 12;
         109 56
          76 44 ]

How can I achieve the output as follows: ?

output = [ 76 44;
                11 99]

These are the output since '76,44' and '11,99' are repeated in all the matrices.

take care
ben

Subject: identify similarly repeated rows

From: Roger Stafford

Date: 10 Oct, 2010 20:51:03

Message: 2 of 2

"ben " <cloader41@gmail.com> wrote in message <i8t87b$2pa$1@fred.mathworks.com>...
> Good day everyone,
>
> Would like some assistance in finding repeated rows in the following matrices:
>
> A = [ 27 89;
> 76 44;
> 10 3;
> 11 99;
> 5 6]
>
> B = [ 11 19;
> 76 44;
> 16 72;
> 11 99;
> 54 61;
> 65 11]
>
> C = [ 27 89;
> 10 3;
> 11 99;
> 5 6;
> 32 12;
> 109 56
> 76 44 ]
>
> How can I achieve the output as follows: ?
>
> output = [ 76 44;
> 11 99]
>
> These are the output since '76,44' and '11,99' are repeated in all the matrices.
>
> take care
> ben
- - - - - - - - - - -
  Use two 'intersect' calls with the 'rows' option.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

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.

Contact us