Info

此问题已关闭。 请重新打开它进行编辑或回答。

How can I create a dynamical cell array?

6 次查看(过去 30 天)
Hi everybody,
I'm trying to analize some data and I need to create a helpful data structure. The data are stored into 2 vectors: the first one is composed by integers, whereas the other one by double (they are times). Now I want to detect the some integers related to the second array by subdividing the time into ranges.
For example:
firstVector=[1, 2, 4, 3, 8, 9, 10, 11, 2, 3, 15, 7, 4, 2, 1];
secondVector=[1.23, 1.35, 1.74, 2.1, 2.2, 2.5, 2.8, 3.11, 3.24, 3.47, 4.5, 4.7, 4.8, 5.0, 5.5];
indxRanges=[0,2,3,4,5,6];
Assume that I want to detect in which order the integers 1,2,3,4 occur in the ranges by evaluating the related times.
For the above example, for the range [0,2] we will obtain 1,2,4 for the range [2,3] we will obtain 3 and so on.
NB: in some ranges these integers might not occur.
Now, I think the best solution to store these data is a cell array. But, How can I create it dynamically?
Thanks!
  1 个评论
Jan
Jan 2015-9-28
I do not understand the question. What does this mean:
detect the some integers related to the second array by subdividing the time into ranges.
? And what is "evaluate" and "related" in "evaluating the related times"?

回答(0 个)

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by