2

对于那里的 Matlab 用户来说,这应该是一个简单的问题。

参数 y 是 1 x 81 矩阵(一个数组)。我的功能如下所示:

function [  ] = test( y )

length(y)

end

然而,当调用 test 时,我收到以下错误:“??? 尝试引用非结构数组的字段。”
我做错了什么?

4

2 回答 2

1

你需要指定一个返回参数!

function [size] = test (y ) etc...
于 2012-09-14T17:45:45.497 回答
-2

test已经是内置功能了。

>> help test
 --- help for classregtree/test ---

 test Compute error rate for tree.
 COST = test(T,'resubstitution') computes the cost of the tree T

T决策树在哪里。

于 2012-09-14T17:51:24.983 回答