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

📄 plottopdir.m

📁 脊波工具和相关实验以及有关实验数据
💻 M
字号:
function plottopdir(ra, n, sorp)% Plot the top n projections of FRATif exist('n', 'var') == 0    K = [1:5];    elseif length(n) == 1    K = [1:n];else    K = n;endn = length(K);% Energy from each projectionvar_ra = var(ra, 1);total_var = sum(var_ra);% Sort into decending order[sort_var, sort_ind] = sort(var_ra);sort_var = fliplr(sort_var);sort_ind = fliplr(sort_ind);% Plot the top n projections (which highest energy)xrange = [1, size(ra, 1)];for i = 1:n,    subplot(n, 1, i),    if exist('sorp', 'var') & sorp == 's'	stem(ra(:,sort_ind(K(i))), '.'),    else	plot(ra(:,sort_ind(K(i)))),    end        title(sprintf('Direction (k) = %d; Energy = %.2f%%', ...		  sort_ind(K(i))-1, 100 * sort_var(K(i))/ total_var)),    set(gca, 'XTickLabel', []);    set(gca, 'XLim', xrange);        % Zero line in the midle for y axis    ymax = 1.1 * max(abs(ra(:,sort_ind(K(i)))));    set(gca, 'YLim', [-ymax, ymax]);    end

⌨️ 快捷键说明

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