Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How can I create a dynamical cell array?

4 visualizaciones (últimos 30 días)
Alessandro Cristini
Alessandro Cristini el 28 de Sept. de 2015
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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 comentario
Jan
Jan el 28 de Sept. de 2015
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"?

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by