【发布时间】:2017-02-05 21:43:14
【问题描述】:
我有一个包含 200 个条目的 4 维数据集。我将在这个数据集中生成一个随机值。我声明了以下变量:
mu = median(Input,2)'; % find the median of Input as MU
sigma = [2 1; 1 4]; % SIGMA
Data = mvnrnd(mu,sigma,10)'; % Generate random number with "mvnrnd" function
但是,MATLAB 给我一个错误如下:
SIGMA must be a square matrix with size equal to the number of columns in MU, or a row vector with length equal to the number of columns in MU.
我认为,“mvnrnd”函数不能生成超过 2D 的数据。
你能给我建议吗?
【问题讨论】:
-
'Data(1,:) = mvnrnd(mu(1,:),sigma,10)';'以此类推,以此类推