Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can I create a dynamical cell array?

조회 수: 6 (최근 30일)
Alessandro Cristini
Alessandro Cristini 2015년 9월 28일
마감: MATLAB Answer Bot 2021년 8월 20일
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