search_rnd.m

来自「This a framework to test new ideas in tr」· M 代码 · 共 29 行

M
29
字号
function [seq_best] = search_rnd( max_search, M, N, L );% [seq] = search_rnd( max_search, M, N, L );% tries out at maximum max_search random sequences and% searches for the best in it...% M is the number of sequences (antennas)% N is the length of the sequences% L is the length of the channelif ( N - L + 1 ) < M * L    disp( 'N - L + 1 < M * L  --> matrix will not be full rank!' );    return;endtr_best = 10000000000000;seq_best = [];for ind = 1:max_search    seq = get_rand_seq( M, N, L, 4 );    S = seq_to_S( seq, L );        t = abs( trace( inv( S' * S ) ) );    if t < tr_best        disp( 'found new best...' );        disp( t );        tr_best = t;        seq_best = seq;        save 'seq_best' seq_best;%        seq_to_2( seq );    endend

⌨️ 快捷键说明

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