📄 cvplot.m
字号:
function cvplot(s_opt, res_mean, res_std)
% CVPLOT Simple plotting function for cross validation results.
% CVPLOT(S_OPT, RES_MEAN, RES_STD) plots the mean reconstruction error
% with error bars resulting from the function CROSSVALIDATE. The optimal
% model choice is marked with a dashed red line.
%
% Author: Karl Skoglund, IMM, DTU, kas@imm.dtu.dk
figure; hold on;
s_sub = linspace(0, 1, 17);
s_sub = s_sub(2:end-1);
t_sub = round(s_sub*length(res_mean));
errorbar(s_sub, res_mean(t_sub), res_std(t_sub), 'bx');
s = linspace(0,1,length(res_mean));
plot(s, res_mean);
ax = axis;
line([s_opt s_opt], [ax(3) ax(4)], 'Color', 'r', 'LineStyle', '-.');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -