11.1 Matlab 的入门1——如何运行M文件

来源:互联网 发布:应届生求职网站知乎 编辑:程序博客网 时间:2024/05/20 23:06

1. 两个数组建立关系,画出图像

代码:

clear all;
P=[0 1 2 3 4 5 6 7 8 9 10];
T=[0 1 2 3 4 3 2 1 2 3 4];
net=newcf1(P,T,5);
net.trainParam.epochs=50;
net.train(net,P,T);
Y=sim(net,P);
plot(P,T,P,Y,'o')


文件命名为:   newcf.m   与函数名newcf1 有意的区分;


2.Matlab 运行后打开newcf.m 文件

绿色三角形按钮运行

 





教程在线网址:

http://emuch.net/html/201408/7816517.html


0 0
原创粉丝点击