# How to exclude the columns of a matrix which are present as columns in another matrix

**URL:** https://discourse.julialang.org/t/how-to-exclude-the-columns-of-a-matrix-which-are-present-as-columns-in-another-matrix/30206
**Category:** Numerics
**Created:** [October 23, 2019, 7:21am UTC](https://discourse.julialang.org/t/how-to-exclude-the-columns-of-a-matrix-which-are-present-as-columns-in-another-matrix/30206 "2019-10-23T07:21:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ujku\_KU](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ujku_ku/32/13159_2.png) [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)
#### Post date: [October 23, 2019, 7:21am UTC](https://discourse.julialang.org/t/how-to-exclude-the-columns-of-a-matrix-which-are-present-as-columns-in-another-matrix/30206/1 "2019-10-23T07:21:09Z")

</div>

Hi guys,

is there any existing function/method in Julia which checks if the columns of a matrix are columns of another matrix, and remove them from one of the matrices in case there is a positive outcome?

Thank you very much in advance for your time and support.

Cheers.

Ergnoor

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [October 23, 2019, 7:38am UTC](https://discourse.julialang.org/t/how-to-exclude-the-columns-of-a-matrix-which-are-present-as-columns-in-another-matrix/30206/2 "2019-10-23T07:38:52Z")

</div>

I don’t think there is a function specifically for this, but it should be rather easy to code.

---

<div class="post-metadata">

### Author: ![Ujku\_KU](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ujku_ku/32/13159_2.png) [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)
#### Post date: [October 23, 2019, 8:30am UTC](https://discourse.julialang.org/t/how-to-exclude-the-columns-of-a-matrix-which-are-present-as-columns-in-another-matrix/30206/3 "2019-10-23T08:30:05Z")

</div>

@Tamas_Papp Hi Tamas and thank you very much for answering my question. Cheers Ergnoor
