?? ransort.m
字號:
function [ind] = ransort(n)% function [ind] = ransort(n)%% function computes an index vector ind of length n which contains% all integers 1:n but in a quasi random order.%% m-file bitrev must be available% author: m. lang 17.12.91% This is very advantageous for example for the function poly:% compute z = roots([1 zeros(1:m) 1]); p = poly(z).% There is a large error in p, which stems from the second operation% poly. If the roots z are sorted with increasing angle in zs, then% ph = poly(zs(ransort(n))) yields much less error than p.%% ransort uses bitreversal which is known as van der corput sequence% in the theory of uniform distributed sequences.m = ceil(log2(n));ind = 1:2^m;ind = bitrev(ind);ind = ind(find(ind<=n));
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -