how to convert this to r2013 a code
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
bassam massouh
el 28 de Nov. de 2014
Respondida: Greg Heath
el 29 de Nov. de 2014
how to convert this to r2013 a code:
clear tempP
for k = 1:500,
P = [theta(k);psi(k);theta_dot(k);psi_dot(k)];
tempP = [tempP P];
end
net= newff([-2 2;-2 2;-2 2;-2 2],[50 1],{'tansig','purelin'},'trainlm');
net.trainParam.epochs = 500;
net = train(net,tempP,out(1:500)');
0 comentarios
Respuesta aceptada
Greg Heath
el 29 de Nov. de 2014
1. This is MATLAB, a MATtrix LAnguage. Typically, loops are unnecessary. If theta, etc are row vectors, use
P = [ theta; psi; theta_dot; psi_dot];
otherwise transpose them before forming P.
2. The target should neither be named out nor should it be a column vector. It should be a row vector named Target or T
[ I N ] = size(P); % [ 4 500 ]
[ O N ] = size(T); % [ 1 500 ]
3. The input syntax you used with NEWFF is DOUBLY obsolete; i.e.,
net = net( minmax(P), [ H O ]);
where the remaining 3 inputs were OMITTED since they are defaults.
4. This newer version is also obsolete:
net = net( P, T, H);
5. NEWFIT (regression)and NEWPR (classification) automatically call NEWFF; ALL are obsolete and have been replaced by FITNET(regression), PATTERNNET(classification) and FEEDFORWARDNET, respectively.
6. To find the correct syntax for your regression problem use the commands
help fitnet
doc fitnet
7. For oogobs of examples, search both the NEWSGROUP and ANSWERS using
greg fitnet.
Hope this helps.
Thank you for formerly accepting my answer
Greg
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!