oversample.m
来自「Continuous Profile Models (CPM) Matlab T」· M 代码 · 共 28 行
M
28 行
% function bigvector = oversample(vector, ratioMore);%% Oversample 'vector' by a ratio 'ratioMore' (eg. ratioMore=2% means that bigvector has 2 X as many entries as vector.%% Use linear interpolation between real pointsfunction bigvector = oversample(vector, ratioMore);%choice='resample'; %note that this depends on the signal toolboxchoice='noInterp';if (choice=='noInterp') newsize = ratioMore*length(vector); bigvector = ones(1,newsize); for ii=1:ratioMore bigvector(ii:ratioMore:end) = vector; endelseif (choice=='resample') bigvector = resample(vector,ratioMore,1);else error('No other options');end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?