1. 计算某变量(常表现为向量或矩阵)所占存储空间大小--多见于数据压缩
Let say a variable named as var1:
inf=whos('var1'); % all information of var1 is stored in the structure "inf"
% show the size by bytes
inf.bytes
2. PRD的计算(百分比均方根误差,具体含义见维基百科或谷歌)
% y是重建信号, xc是原始信号;
err=y-xc; %表示残差向量
prd=sqrt(sum(err.^2)/sum(y.^2));
3. 向量的连接
% 对于行向量:
dataConn=[data1, data2];
% 或者
dataConn=[data1 data2];
% 注意到:[]连接符只是针对于行向量, 如果要对两个列向量进行连接, 则相应地为:
dataConnTemp=[data1', data2']; %此中间结果当然是行向量
dataConn=dataConnTemp
4. 计算文件(夹)大小--存储空间等信息
info=dir('ToBeTransfered.mat');
info.bytes
5. 标准十二导联动态心电数据采用同步记录的方式,其数据列从往右依次为:
I II III aVR aVL aVF V1 V2 V3 V4 V5 V6
其中,各数据导联之间由于电路设计的原因存在数据冗余,其计算公式如下:
II = I + III (1)
aVR = -0.5 * ( I + II ) (2)
aVL = I - 0.5 * II (3)
aVF = II - 0.5 * I (4)