Row column question

2 views (last 30 days)
Mate 2u
Mate 2u on 6 Feb 2012
Dear all, I have a question to ask. I have 4 columns with dates with many rows of a value. It is a series of 2 prices with their corresponding dates.
I have in the first column the dates (04/12/2008) and in the 2nd column a value. In the 3rd column I have a date and in the 4th column I have a value.
Lets say for instance the first 2 columns are oil and 3,4 th column are natural gas.
I need a way to make sure the 1st and 3rd dates match up and what ever date which inst in column 1 or 3 I would like to delete that entry.
Hence at the end I would like the exact same number of rows and the dates which they both do not have I would like to be deleted.
I hope my English was not bad enough and somebody can help me.
Thank you.

Accepted Answer

Sean de Wolski
Sean de Wolski on 6 Feb 2012
doc intersect
will be your friend

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!