文件名称:conversion_gui
- 所属分类:
- matlab例程
- 资源属性:
- [Matlab] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 8kb
- 下载次数:
- 0次
- 提 供 者:
- thinki******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
function ret = Int2Hex(var)
Prints integer array to hexadecimal string
varType = class(var)
cast signness away:
if ( u ~= varType(1) )
varType = [ u varType]
var = typecast(var,varType)
end
nBits = str2double(varType(5:end))
if (64 == nBits)
split 64 bit case into two 32 s
cuz dec2hex doesn t handle 64 bit...
varType(5:end) = 32
var = typecast(var,varType)
end
ret = dec2hex(var)
if (64 == nBits)
littleEndian = all(typecast(uint32(1), uint16 )==[1 0])
first = 1 + littleEndian
second = 2 - littleEndian
ret = [ret(first:2:end,:),ret(second:2:end,:)]
end
end-function ret = Int2Hex(var)
Prints integer array to hexadecimal string
varType = class(var)
cast signness away:
if ( u ~= varType(1) )
varType = [ u varType]
var = typecast(var,varType)
end
nBits = str2double(varType(5:end))
if (64 == nBits)
split 64 bit case into two 32 s
cuz dec2hex doesn t handle 64 bit...
varType(5:end) = 32
var = typecast(var,varType)
end
ret = dec2hex(var)
if (64 == nBits)
littleEndian = all(typecast(uint32(1), uint16 )==[1 0])
first = 1 + littleEndian
second = 2 - littleEndian
ret = [ret(first:2:end,:),ret(second:2:end,:)]
end
end
Prints integer array to hexadecimal string
varType = class(var)
cast signness away:
if ( u ~= varType(1) )
varType = [ u varType]
var = typecast(var,varType)
end
nBits = str2double(varType(5:end))
if (64 == nBits)
split 64 bit case into two 32 s
cuz dec2hex doesn t handle 64 bit...
varType(5:end) = 32
var = typecast(var,varType)
end
ret = dec2hex(var)
if (64 == nBits)
littleEndian = all(typecast(uint32(1), uint16 )==[1 0])
first = 1 + littleEndian
second = 2 - littleEndian
ret = [ret(first:2:end,:),ret(second:2:end,:)]
end
end-function ret = Int2Hex(var)
Prints integer array to hexadecimal string
varType = class(var)
cast signness away:
if ( u ~= varType(1) )
varType = [ u varType]
var = typecast(var,varType)
end
nBits = str2double(varType(5:end))
if (64 == nBits)
split 64 bit case into two 32 s
cuz dec2hex doesn t handle 64 bit...
varType(5:end) = 32
var = typecast(var,varType)
end
ret = dec2hex(var)
if (64 == nBits)
littleEndian = all(typecast(uint32(1), uint16 )==[1 0])
first = 1 + littleEndian
second = 2 - littleEndian
ret = [ret(first:2:end,:),ret(second:2:end,:)]
end
end
(系统自动生成,下载前可以参看下载内容)
下载文件列表
conversion_gui
..............\conversion_gui.fig
..............\conversion_gui.m
..............\conversion_gui.fig
..............\conversion_gui.m