/// <summary>
/// 数组转二维数组
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public double[,] chuliData(double[] obj)
{
double[,] dat = new double[obj.Length, 1];
for (int i = 0; i < obj.Length; i++)
{
dat[i / 1, i % 1] = obj[i];
}
return dat;
}
/// <summary>
/// 去除数组所有0字节
/// </summary>
/// <param name="packet"></param>
/// <returns></returns>
public double[] ToRepeat(double[] packet) {
var i = packet.Length - 1;
while (packet[i] == 0)
{
--i;
}
var temp = new double[i + 1];
Array.Copy(packet, temp, i + 1);
return temp;
}
byte[] b1 = new byte[] { 1, 2, 3, 4, 5 };
byte[] b2 = new byte[] { 6, 7, 8, 9 };
byte[] b3