Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
';statsfminbx';MATLAB内置factoran()的错误_Matlab_Machine Learning_Statistics_Mathematical Optimization - Fatal编程技术网

';statsfminbx';MATLAB内置factoran()的错误

';statsfminbx';MATLAB内置factoran()的错误,matlab,machine-learning,statistics,mathematical-optimization,Matlab,Machine Learning,Statistics,Mathematical Optimization,在对我的数据进行因子分析时,是否有人可以帮助调试以下错误 factoran(x,2) ; %where x is <250*10> double => Undefined function 'statsfminbx' for input arguments of type 'cell'. Error in factoran [Psi1, nll, lagrange, err, output] = ... factoran(x,2);%其中x是double=> 类型为“cell

在对我的数据进行因子分析时,是否有人可以帮助调试以下错误

factoran(x,2) ; %where x is <250*10> double =>
Undefined function 'statsfminbx' for input arguments of type 'cell'.
Error in factoran
[Psi1, nll, lagrange, err, output] = ...
factoran(x,2);%其中x是double=>
类型为“cell”的输入参数的未定义函数“statsfminbx”。
factoran中的错误
[Psi1,nll,拉格朗日,错误,输出]=。。。
在查看代码(第269行)后,由于某些原因,似乎无法获得荷载的最大似然估计值,因此我寻找解决此问题的方法


提前感谢

statsfminbx
是一个to
factoran
,只能由
factoran
本身调用

如果创建一个名为
private
的文件夹并将代码放入其中,则只能从直接父文件夹中的代码调用该代码(对于直接父文件夹中的代码,它实际上只位于路径上)。这是一种避免污染名称空间的有用技术

原始的
factoran
位于
toolbox\stats\stats\factoran.m
中,因此可以调用
toolbox\stats\stats\private\statsfminbx.m

当您复制了
factoran
并将其置于默认文件夹之外时,您的副本将无法再访问专用功能
statsfminbx
。您可以尝试制作自己的
private
文件夹副本,将其放置在
factoran
副本下方的适当位置,并将
statsfminbx
副本放入其中。(另一方面,您可能会发现,随后会出现与另一个私有函数的另一个类似问题相关的不同错误)

PS除非你有很好的理由这样做,否则自己复制工具箱代码通常不是一个好主意——出于这些原因,它很可能会崩溃


PPS您可以通过键入
which statsfminbx
来判断这是个问题,您会看到它没有找到-但是键入
which-all statsfminbx
,您会看到它找到了它,告诉您它是
stats
文件夹的私有函数。

您确定
x
是一个250*10的双倍数组,而不是某种单元格数组?键入
whosx
时,它是说
250x10 double
,还是说类是
cell
?由于我在默认工具箱文件夹外的另一个目录中复制了
factoran.m
,因此发生了错误。因此,错误消息只是误导性的,因为它与我最初认为与您类似的某些
单元类型无关。