Cell Array Analysis - sequences

1 次查看(过去 30 天)
Victoria
Victoria 2023-2-9
回答: Timo Dietz 2023-2-22
Hi,
I have a 1x59 cell array, each holding varying sequences of numbers from 1 to 28. I am trying to determine the percentages of movements between the transitions between one number in the sequence to another (i.e. 1 to 2, 2 to 1 etc.) which can later be used as weights for ploting a graph. My coding attempts have recommended that I omit the occasions that the value repeats itself (i.e. 1 to 1), however, that is a features of some of the examples. Is there a way to analyse the sequences within each cell array without having to omit self loops?
  3 个评论
Adam Danz
Adam Danz 2023-2-9
These kinds of tasks are clearer with intput/output examples that are similar to your actual data. "Sequence of numbers" is value. are they vectors? Multidimensional arrays? "Movements between the transitions" is vague - I can't picture what this means, even with the 2-1 1-2 example.
Nikhil
Nikhil 2023-2-22
Hi Victoria,
As mentioned by Adam, the explanation is not clear. Provide more information on what is happening.

请先登录,再进行评论。

回答(1 个)

Timo Dietz
Timo Dietz 2023-2-22
Doesn't the 'diff' function applied to the sequences deliver what you need?

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by