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

Recommended Answers

All 4 Replies

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

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.

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.

Thank you I already solved the problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.