Convert data to binary and ASCII format

5 次查看(过去 30 天)
If the variable
a=[3 2 1; 1 2 3; 2 3 1]
b=[1 2 3; 4 6 7; 5 3 5]
c=[a*b]
How to I save each variable as binary format and ASCII format?

回答(1 个)

sixwwwwww
sixwwwwww 2013-12-9
编辑:sixwwwwww 2013-12-9
You can do it as follow:
a = [3 2 1; 1 2 3; 2 3 1];
dec2bin(a) % decimal to binary conversion
b = double(num2str(a)) % decimal to ASCII conversion
  5 个评论
Walter Roberson
Walter Roberson 2013-12-9
Have you decided yet which representation you are going to use ?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by