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

📄 add_noise.m

📁 这个程序是TD-S-CDMA系统中,TDOA定位方法的系统程序.
💻 M
字号:
function out=add_noise(v,rate,down,up)
% add impulsive NLOS error to normal error
% v: normal location error
% rate: the ratio of impulsive NLOS error to the lenght of normal error
% up: up bound of impulsive NLOS error
% down: down bound of impulsive NLOS error


        N=round(length(v)*rate);
        
        nlos=down+(up-down)*rand(1,N);
        
        K=length(v);
        
        out(1:K)=0;
        
        for n=1:N
            index=randint(1,1,K-1)+1;
            out(index)=v(index)+nlos(n);
        end
        out=out+v;

⌨️ 快捷键说明

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