How do I skip every other row of data in an array and write to a text file or another array?
22 次查看(过去 30 天)
显示 更早的评论
I have an array (10 x 5 double) that looks like this;
2015 1a 1b 1c 1d
2015 2a 2b 2c 2d
2015 3a 3b 3c 3d
2015 4a 4b 4c 4d
2015 5a 5b 5c 5d
2015 6a 6b 6c 6d
2015 7a 7b 7c 1d
2015 8a 8b 8c 8d
2015 9a 9b 9c 9d
2015 10a 10b 10c 10d
I’m trying to come up with a consistent way to read every 3rd row of data, and then write it to another array or text file. The end result would be an array or text file whose contents look like this:
2015 1a 1b 1c 1d
2015 4a 4b 4c 4d
2015 7a 7b 7c 1d
2015 10a 10b 10c 10d
Any ideas on how to approach this are appreciated.
Thank you.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!