如题所述
实现方法:
1、建立自定义函数文件,myfun.m,具体内容如下
function y=myfun(x)
y=sin(x)^2+cos(x)^2;
end
2、在当前文件目录下的输入窗口命令
>>x=pi/3;
>>y=myfun(x)
y=1