param.m是matlab自带的函数,其函数如下:
classdef param < handle
%PARAM parameter class
%
% Derived from handle and contains a cell array; used to represent parameters and
% allows sharing of parameters (i.e., equivalence classes).
%
% Copyright (C) 2008 Marcel van Gerven
%
% $Log: param.m,v $
%
properties
value % can be anything
end
methods
function obj = param(value)
obj.value = value;
end
end
end
我查了自己的程序,因为不加function的时候是可以运行的,所以程序应该是没有问题,但是为什么加了function就不行呢?难道function有什么特殊的要求吗?