📄 hex2int.m
字号:
function x_int=hex2int(x_hex);
x_int=0;
e=0;
for i1=length(x_hex):-1:1
str=x_hex(i1);
switch upper(str)
case '0', temp=0;
case '1', temp=1;
case '2', temp=2;
case '3', temp=3;
case '4', temp=4;
case '5', temp=5;
case '6', temp=6;
case '7', temp=7;
case '8', temp=8;
case '9', temp=9;
case 'A', temp=10;
case 'B', temp=11;
case 'C', temp=12;
case 'D', temp=13;
case 'E', temp=14;
case 'F', temp=15;
end;
x_int=x_int+temp*16^e;
e=e+1;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -