【提问】如何将十进制​转换二进制的char​数字生成为doubl​e矩阵。

5 views (last 30 days)
我想将十进制的数转化为40位的二进制数,并且将二进制数生成1x40 double 的矩阵
x = 3.6958e+11
x_bin_char = dec2bin(x,40); %十转2 40位
x_bin_cell = regexp(x_bin_char,'\d*\.?\d*','match');
x_bin = cell2mat(x_bin_cell);

Accepted Answer

金沙显示出款大额通道维护系统审核失败暂时无法提款怎么办?【微81923899】
x_bin_double = x_bin_char-'0'

More Answers (0)

Categories

Find more on 字符和字符串 in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!