⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 write_uint32_hex.m

📁 mimo2x2天线选择系统的全系统matlab程序,先前的是dsp程序.
💻 M
字号:
function write_uint32_hex(name,A)
%
% write_uint32_hex(name,A)
%
% Write elements of matrix A in .dat format, suitable for loading
% into Code Composer Studio.
%
% Elements are rounded to 32-bit unsigned integer format
% and the values are stored in hex-format (little endian)

N=prod(size(A));

% convert to double, and/or round to nearest integer
A=round(double(A));

if any(A>2^32-1 | A<0)
    error('One or more values are out of range')
end

fid = fopen(name,'wt');
fprintf(fid,'1651 1 0 0 %X\n',N);
fprintf(fid,'0x%08X\n',A);
fclose(fid);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -