Find all values between 2 index columns
9 次查看(过去 30 天)
显示 更早的评论
Say two columns (C) be this:
1 5
7 13
20 32
These are index values. The 1st column is the starting index, the 2nd column the ending index.
I want to find all values from (dataset) between these 2 index columns.
If i use this code, it only gives me values for the 1st row.
value = dataset(C(:,1):C(:,2));
How do I code this, so that it gives me all the values for every index row?
Many thanks.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!