Conversion from char data type to double
显示 更早的评论
I converted a data [0.104895105] from double to binary[0001]. But this binary data is in char form as in excel it shows like '0001'.
1. Is it possible to convert back to double data type without loosing any thing?
2. is it possible to remove ' ' from the data? Thanks in Advance.
3 个评论
James Tursa
2015-10-28
How is 0.104895105 converted into 0001? What algorithm are you using for the conversion?
Amit Mishra
2015-10-31
Walter Roberson
2015-10-31
Suppose I have a function that converts the value -2 to the value 4. I do not tell you what the function is. I ask you to convert the value 4 back to -2 without seeing my function. Can you do it?
Answer: No. There are an infinite number (Aleph 1) of functions that happen to map -2 to 4. One of them is f(x) = x^2. But that function also maps +2 to 4, so given only the value 4 there is no way to invert that function to get -2 unambiguously.
回答(1 个)
Walter Roberson
2015-10-29
编辑:Walter Roberson
2015-10-29
0 个投票
Subtract '0' from the array. That is '0' not 0
2 个评论
Amit Mishra
2015-10-29
编辑:Amit Mishra
2015-10-29
Walter Roberson
2015-10-29
You want a numeric data type holding 4 distinguishable locations. In MATLAB, all numeric data types are displayed with whitespace between locations by any of the routines that do automatic formatting.
As far as I understand, Excel has no way of holding multiple numeric values in a single cell.
类别
在 帮助中心 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!