Extracting data from matrix row vector
2 次查看(过去 30 天)
显示 更早的评论
I have a double Streams with some process I have got vector F which has a value Now I want to go back to the Streams and locate value matching value of F; get 100 columns forward and collect all the data between those two columns. I tried with ismember to locate the position of F in Streams but no success
Data=Streams(J: (J-2544))%does not work
0 个评论
采纳的回答
Star Strider
2016-1-21
MATLAB by default increments using the colon ‘:’ operator. If you want it to decrement, you have to tell it specifically to use a negative step.
See if this does what you want:
Data=Streams(J : -1 : (J-2544));
Notice the ‘-1’ step.
8 个评论
Star Strider
2016-1-22
If you cannot address your data arrays correctly, it could affect your data analysis.
‘J’ still needs to be an integer to create your subscript vector.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!