0

Hi
I want to write a program which reads from the end of the length of the data up to 15 data's consicutively,for example if the data is
12 3 4 5 65 45 23 2 3 4 5 6 6 7 8 8 9 9 9 9 9 94 21 12 33 45 45 45 45 45 12 34 56 34 42 45 50 34 34
what I want is I want to read from the last data 34 back up to 33 everytime. I mean the data will update or increase it´s number through time.
Any help would be appreciated

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Bisaye
0

How are the data stored? What language do you use?

The datas are output of another program written in Matlab and the language is matlab.

0

That is only a partial answer, as I still don't know the format. If you can take it in as a stream (as the possibility of added data over time suggests), you can store the values successively in a kind of queue for 15 items, always dropping the oldest ones when the size is exceeded. You would then operate on the contents of this queue.

If you have all data as a list, you would need some sort of sublist, if it is a vector, some sort of subvector function.

If you have all data as a string, you would need to split/parse it into some sort of list or vector first.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.