Borrar filtros
Borrar filtros

how to convert this to r2013 a code

2 visualizaciones (últimos 30 días)
bassam massouh
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)');

Respuesta aceptada

Greg Heath
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

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by