摘要:
clear all;close all;clc;randn('seed',0);%{一维情况mu=0;N=100000;S=5;data=mvnrnd(mu,S,N);me=mean(data);S2=1/N*sum((data-me).^2);%}%%二维或多维情况mu=[0 0];S=[0.3 0;0 0.35];N=10000;data=mvnrnd(mu,S,N);me=mean(data)S1=1/N*sum((data(:,1)-me(1)).^2)S2=1/N*sum((data(:,2)-me(2)).^2) 阅读全文