How to perform Arthemtic Codding on Nested Cell Aray

1 次查看(过去 30 天)
I am having the following cell C, with the associated data
2x1 cell
[29;32]
[0;72]
2x1 cell
[]
[29;31;33;64]
6x1 cell
[]
[0;11;14;15;20;22;45;53]
[0;13;16;17;34;47]
[0;18;21;33]
[0;10;15;16;17]
[0;10;14;24;31]
18x1 cell
[]
[]
[]
[]
[]
11x1 int8
13x1 int8
[0;10;11;13;15;16;18;21;22;33]
16x1 int8
[0;10;11;13;15;20;23;24;26]
[0;10;11;13;14;16;18;25]
0
[0;14;15]
[0;11;13;14;16;20;21;23]
[0;11;13;15;21]
[0;10;11;12;14;17;19;20;23]
[0;10;11;12;13;15;16;18;20]
[0;10;11;12;14;15;19;20;25]
How can we apply Arithmetic coding of the above cell C. I tried to do Ac on each cell, but it is ending in error. How can we retrieve the unique symbols from all the cell and its count, so we can run the AC function, without effecting the cell structure. Also how can be do the decoding and retrieve the cell back?

采纳的回答

Walter Roberson
Walter Roberson 2017-2-21
inner_layer = @(inner) AC( length(inner), unique(inner), inner );
middle_layer = @(middle) cellfun(inner_layer), middle, 'uniform', 0);
result = cellfun(middle_layer, C, 'uniform', 0);
  21 个评论
Walter Roberson
Walter Roberson 2017-2-25
The question has changed enough that I recommend creating a new Question on the topic with more detail on what you are looking for in this phase

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Encryption / Cryptography 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by