回覆列表
  • 1 # 使用者293966894496

    dat_h= int16(123);

    dat_l= int16(-321);

    if dat_h >= 0

    dat_h_bin = dec2bin(dat_h,16);

    else

    dat_h_bin = dec2bin(2^16-dat_h,16);

    end

    if dat_l >= 0

    dat_l_bin = dec2bin(dat_l,16);

    else

    dat_l_bin = dec2bin(2^16-dat_l,16);

    end

    if dat_h >= 0

    dout = single(bin2dec([dat_h_bin,dat_l_bin]));

    else

    dout = single(2^32 - bin2dec([dat_h_bin,dat_l_bin]));

    end

  • 中秋節和大豐收的關聯?
  • 夫唯不爭故天下莫能與之爭什麼意思?