matlab adapt函数用法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了matlab adapt函数用法相关的知识,希望对你有一定的参考价值。

net = newlin([-1 1;-1 1],1,0,0.1);
net.IW1,1 = [0 0];
net.b1 = 0;
P = [1 2 2 3; 2 1 3 1];
T = [4 5 7 7];
[net,a,e,pf] = adapt(net,P,T);

结果输出为::
??? Error using ==> mse
Too many input arguments.

Error in ==> trains at 163
tr.perf(ts) = feval(performFcn,El(:,ts),Yl(:,ts),getx(net),performParam);

Error in ==> network.adapt at 179
[net,tr,Ac,El] = feval(adaptFcn,net,Pd,Tl,Ai,Q,TS,[],[]);

Error in ==> aa at 6
[net,a,e,pf] = adapt(net,P,T);
>>

有谁知道为什么吗?我是按照书上做的
启动MATLAB时候每次都跳出一下情况:
Warning: MATLAB Toolbox Path Cache is out of date and is not being used.
Type 'help toolbox_path_cache' for more info
是不是跟这有关?

神经网络方面的函数吧,帮你运行了一下没发现错误,如下:
net =

Neural Network object:

architecture:

numInputs: 1
numLayers: 1
biasConnect: [1]
inputConnect: [1]
layerConnect: [0]
outputConnect: [1]
targetConnect: [1]

numOutputs: 1 (read-only)
numTargets: 1 (read-only)
numInputDelays: 0 (read-only)
numLayerDelays: 0 (read-only)

subobject structures:

inputs: 1x1 cell of inputs
layers: 1x1 cell of layers
outputs: 1x1 cell containing 1 output
targets: 1x1 cell containing 1 target
biases: 1x1 cell containing 1 bias
inputWeights: 1x1 cell containing 1 input weight
layerWeights: 1x1 cell containing no layer weights

functions:

adaptFcn: 'trains'
initFcn: 'initlay'
performFcn: 'mse'
trainFcn: 'trainb'

parameters:

adaptParam: .passes
initParam: (none)
performParam: (none)
trainParam: .epochs, .goal, .max_fail, .show,
.time

weight and bias values:

IW: 1x1 cell containing 1 input weight matrix
LW: 1x1 cell containing no layer weight matrices
b: 1x1 cell containing 1 bias vector

other:

userdata: (user stuff)

a =

15.4000 16.2000 24.4000 21.1000

e =

-11.4000 -11.2000 -17.4000 -14.1000
参考技术A 你的程序没有问题,
你的matlab是6.5版?你有7.0版的就可以了!
net =

Neural Network object:

architecture:

numInputs: 1
numLayers: 1
biasConnect: [1]
inputConnect: [1]
layerConnect: [0]
outputConnect: [1]
targetConnect: [1]

numOutputs: 1 (read-only)
numTargets: 1 (read-only)
numInputDelays: 0 (read-only)
numLayerDelays: 0 (read-only)

subobject structures:

inputs: 1x1 cell of inputs
layers: 1x1 cell of layers
outputs: 1x1 cell containing 1 output
targets: 1x1 cell containing 1 target
biases: 1x1 cell containing 1 bias
inputWeights: 1x1 cell containing 1 input weight
layerWeights: 1x1 cell containing no layer weights

functions:

adaptFcn: 'trains'
initFcn: 'initlay'
performFcn: 'mse'
trainFcn: 'trainb'

parameters:

adaptParam: .passes
initParam: (none)
performParam: (none)
trainParam: .epochs, .goal, .max_fail, .show,
.time

weight and bias values:

IW: 1x1 cell containing 1 input weight matrix
LW: 1x1 cell containing no layer weight matrices
b: 1x1 cell containing 1 bias vector

other:

userdata: (user stuff)

a =

0 0 0 0

e =

4 5 7 7

pf =

[]

以上是关于matlab adapt函数用法的主要内容,如果未能解决你的问题,请参考以下文章

matlab movie函数的用法

Delphi 中PChar()函数的用法

matlab中某些函数的用法

matlab 函数quadprog 用法

matlab 中 bwboundaries 函数 的用法

matlab中hough函数用法