Help on conversion of data
古いコメントを表示
Please help me on it
- if i have 3 column of data
- convert the data to binary 4 bit
- concat it to one data to make 12 bits
- transpose the concated data
- and take it as input.
Thanks
6 件のコメント
TastyPastry
2015 年 10 月 20 日
Can you post a file showing more specifically what the formatting of the file, as well as the format are?
Image Analyst
2015 年 10 月 20 日
What data do you have for input? Integers? In what range? What does "and take it as input" mean to you? (It means nothing to me, except maybe to pass it to a function as an input argument.)
Amit Mishra
2015 年 10 月 21 日
Walter Roberson
2015 年 10 月 21 日
12 bits per row? As in a numeric array which is something high by 12 wide? Or is the 12 bits to be converted into a single integer in the range 0 to 4095 ?
Amit Mishra
2015 年 10 月 21 日
Amit Mishra
2015 年 10 月 22 日
回答 (2 件)
Walter Roberson
2015 年 10 月 21 日
0 投票
1 件のコメント
Walter Roberson
2015 年 10 月 21 日
dec2bin( floor(A(:,1) * 16) * 256 + floor(A(:,2) * 16) * 16 + floor(A(:,3) * 16), 12) - '0'
With 4 bits you can code 32 numbers, like the integers from 0 to 31. You cannot convert double precision numbers between 0 and 1 to 4 bit without loss. One way to convert would be to multiply by 32 and then use dec2bin.
6 件のコメント
Amit Mishra
2015 年 10 月 21 日
Thorsten
2015 年 10 月 21 日
Please post the cmtfinal.xlsx and your MyNum2Bin function so we can have a look.
Amit Mishra
2015 年 10 月 21 日
Thorsten
2015 年 10 月 21 日
Please post the xls file and your code to call MyNum2Bin.
Amit Mishra
2015 年 10 月 21 日
Amit Mishra
2015 年 10 月 22 日
カテゴリ
ヘルプ センター および File Exchange で Data Type Conversion についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

