0
tesconf是3x3矩陣;matlab對角碼
tes_avg = (diag(tesconf)./sum(tesconf,2));
例子tes_avg的結果給出[0.345; 0.3423; 0.483]
但是,我希望得到這3個值的平均結果,我應該如何改變上面的代碼,請指教? ...
tesconf是3x3矩陣;matlab對角碼
tes_avg = (diag(tesconf)./sum(tesconf,2));
例子tes_avg的結果給出[0.345; 0.3423; 0.483]
但是,我希望得到這3個值的平均結果,我應該如何改變上面的代碼,請指教? ...
只需avg = mean(tes_avg);
(或直接tes_avg = mean(diag(tesconf)./sum(tesconf,2));
)。