怎样将二进制文件中的指定字节转化为浮点数字?例如将图中的第一行04——07字节转化为浮点数字,感谢专家!

正确的结果是 : 1006.27
二进制文件如下:
598A0F0548917B44F6C87B44855B7B44D7637B44DA57BE45140B000000000000
ScriptingWindows回复:如何將二進製文件中的指定字節轉化為浮點數字?excel VBA

回复: 怎样将二进制文件中的指定字节转化为浮点数字?这个函数实现不了
CopyMemory v, b(0), 4
Re: 怎样将二进制文件中的指定字节转化为浮点数字?感谢专家!
这个二进制文件中的
00、01字节——年月日
02、03字节——时分

这样代码中的是否要增加分段?再次感谢!
numbers = Blob To Matrix( blobdata, "float", 4, "little" );
Re: 如何將二進製文件中的指定字節轉化為浮點數字?您可以將這四個字節處理為四個 1 字節 uint 或兩個 2 字節 uint。 Uint 表示無符號整數。 使用 uint 代替浮動。 您將必須弄清楚它們如何表示時間,只有一個未解碼的示例並不明顯。
Re: 怎样将二进制文件中的指定字节转化为浮点数字?我还有没有能力进行这种操作。
我将整个文件上传、它有5070行这样结构的数据。
看看要如何编码?
谢谢!
00 to 01 bytes: indicates the date. If the value is num, the date calculation method is as follows:
year=floor(num/2048)+2004;
month=floor(mod(num,2048)/100);
day=mod(mod(num,2048),100);
02 to 03 bytes: indicates the number of minutes from 0 o 'clock to the present
04 to 07 bytes: float
08 to 11 bytes: float
12 to 15 bytes: float
16 to 19 bytes: float
20 to 23 bytes: float
24 to 27 bytes: integer
28 to 31 bytes :(reserved)
Re: 如何將二進製文件中的指定字節轉化為浮點數字?您可以像這樣製作數據圖表。 似乎有一些異常值!
data extracted from the zip file and graphed to see outliers.從 zip 文件中提取數據並繪製圖表以查看異常值。
/*
00 to 01 bytes: indicates the date. If the value is num, the date calculation method is as follows:
year=floor(num/2048)+2004;
month=floor(mod(num,2048)/100);
day=mod(mod(num,2048),100);
02 to 03 bytes: indicates the number of minutes from 0 o 'clock to the present
04 to 07 bytes: float
08 to 11 bytes: float
12 to 15 bytes: float
16 to 19 bytes: float
20 to 23 bytes: float
24 to 27 bytes: integer
28 to 31 bytes :(reserved)
*/
za = Open( "z:/445.zip", "zip" ); // open the zip file
datasetname = (za << dir)[1];
blobdata = za << read( datasetname, Format( blob ) ); // load the member as a blob
//
// the following 3 lines import ALL of the data each time. Later,
// only use the columns that were really in that format.
//
integer2 = Blob To Matrix( blobdata, "uint", 2, "little", 16 ); // get the 2-byte unsigned ints for columns 0-1 and 2-3
integer4 = Blob To Matrix( blobdata, "uint", 4, "little", 8 ); // get the 4-byte unsigned ints for columns 24-27 and 28-31
float4 = Blob To Matrix( blobdata, "float", 4, "little", 8 ); // get the 4-byte floats for columns 4-23
// pre-process the matrix columns; no explicit loop is required...
years = Floor( integer2[0, 1] / 2048 ) + 2004;
months = Floor( Mod( integer2[0, 1], 2048 ) / 100 );
days = Mod( Mod( integer2[0, 1], 2048 ), 100 );
seconds = 60 * integer2[0, 2];
// create a table. You could also use new table, but the v1...v5 would be a little more code to type
dt = As Table(
years,
months,
days,
seconds,
float4[0, 2 :: 6],
integer4[0, 7 :: 8],
<<COLUMNNAMES></COLUMNNAMES>
Re: 怎样将二进制文件中的指定字节转化为浮点数字?非常感谢专家的帮助!
JMP功能太强大了!
JMP原来可以这样使用!
我所懂得的也太少了。
再次感谢专家 !
Re: 怎样将二进制文件中的指定字节转化为浮点数字?我试着这样修改、但不成功。
r = N Row( years );
dt = As Table(
years,
months,
days,
seconds,
float4[r - 479 :: r, 2 :: 6], ////
integer4[r - 479 :: r, 7 :: 8], ///
<<COLUMNNAMES></COLUMNNAMES>
Re: 如何將二進製文件中的指定字節轉化為浮點數字?日誌中有消息嗎?
所有這些數組(年、月、日、秒)都需要相同的處理:例如,years[r-479::r]。
創建表後,從表中刪除不需要的行可能會更容易。 嘗試使用日期列來選擇您關心的範圍。
Re: 怎样将二进制文件中的指定字节转化为浮点数字?看到这个图形、我提两个疑点 :
1、为了图形连续、不受日期间隔的影响、有什么简单方法实现。我只会使用行号列来作为X轴
Column( "reserved" ) << Formula( Row() );dt << run formulas;Column( "reserved" ) << deleteFormula;
……
Variables( X( :reserved ), Y( :v5 ), Y( :v4 ), Y( :v3 ), Y( :v2 ), Y( :v1 ), Y( :xx ) ),

2、其实这个数据股票的交易数据。
JMP能否直接制作象这种日本蜡烛图。在excel中能简单制作这种图

非常感谢!