将matlab单元格数组写入文本文件

时间:2015-03-23 08:43:11

标签: matlab

我有霍夫曼编码的一些数据,如

dict = huffmandict(symbols,p)。

dict的值如下。

[-21]    [1x9  double]
[-20]    [1x9  double]
[-19]    [1x8  double]
[-18]    [1x9  double]
[-17]    [1x9  double]
[-16]    [1x9  double]
[-15]    [1x9  double]
[-14]    [1x9  double]
[-13]    [1x9  double]
[-12]    [1x8  double]
[-11]    [1x9  double]
[-10]    [1x9  double]
[ -9]    [1x9  double]
[ -8]    [1x8  double]
[ -7]    [1x8  double]
[ -6]    [1x8  double]
[ -5]    [1x7  double]
[ -4]    [1x6  double]
[ -3]    [1x6  double]
[ -2]    [1x5  double]
[ -1]    [1x3  double]
[  0]    [          0]
[  1]    [1x3  double]
[  2]    [1x5  double]
[  3]    [1x6  double]
[  4]    [1x6  double]
[  5]    [1x7  double]
[  6]    [1x7  double]
[  7]    [1x7  double]
[  8]    [1x7  double]
[  9]    [1x8  double]
[ 10]    [1x8  double]
[ 11]    [1x8  double]
[ 12]    [1x8  double]
[ 13]    [1x8  double]
[ 14]    [1x8  double]
[ 15]    [1x8  double]
[ 16]    [1x9  double]
[ 17]    [1x9  double]
[ 18]    [1x8  double]
[ 19]    [1x9  double]
[ 20]    [1x10 double]
[ 21]    [1x10 double]
[ 22]    [1x11 double]
[ 23]    [1x10 double]
[ 24]    [1x10 double]
[ 25]    [1x10 double]
[ 26]    [1x10 double]
[ 27]    [1x11 double]
[ 28]    [1x10 double]

现在我想把这个dict写入一个文本文件,然后在解码过程中从同一个文本文件中检索它。我尝试使用dlmwrite()函数但它不起作用。请告诉我怎么写这个数据到一个文本文件,然后以相同的格式检索它。提前谢谢。

0 个答案:

没有答案