insert.m
来自「OFDM降低峰平比采用预失真技术」· M 代码 · 共 55 行
M
55 行
% insert.m
% linear interpolation
function [table_an,table_pn]=insert(table_an,table_pn,address_i,address_low,address_high)
cap=512;
if address_i==1
xa=[address_i,(address_high)];
ya=[table_an(address_i),table_an(address_high)];
xa1=address_i:address_high;
ya1=interp1(xa,ya,xa1,'linear');
for i=address_i:address_high
table_an(i)=ya1(i);
end
xp=[address_i,address_high];
yp=[table_pn(address_i),table_pn(address_high)];
xp1=address_i:address_high;
yp1=interp1(xp,yp,xp1,'linear');
for i=address_i:address_high
table_pn(i)=yp1(i);
end
elseif address_i==cap
xa=[address_low,address_i];
ya=[table_an(address_low),table_an(address_i)];
xa1=address_low:address_i;
ya1=interp1(xa,ya,xa1,'linear');
for i=address_low:address_i
table_an(i)=ya1(i-address_low+1);
end
xp=[address_low,address_i];
yp=[table_pn(address_low),table_pn(address_i)];
xp1=address_low:address_i;
yp1=interp1(xp,yp,xp1,'linear');
for i=address_low:address_i
table_pn(i)=yp1(i-address_low+1);
end
else
xa=[address_low,address_i,(address_high)];
ya=[table_an(address_low),table_an(address_i),table_an(address_high)];
xa1=address_low:address_high;
ya1=interp1(xa,ya,xa1,'linear');
for i=address_low:address_high
table_an(i)=ya1(i-address_low+1);
end
xp=[address_low,address_i,address_high];
yp=[table_pn(address_low),table_pn(address_i),table_pn(address_high)];
xp1=address_low:address_high;
yp1=interp1(xp,yp,xp1,'linear');
for i=address_low:address_high
table_pn(i)=yp1(i-address_low+1);
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?