フィルターのクリア

how to convert this to r2013 a code

1 回表示 (過去 30 日間)
bassam massouh
bassam massouh 2014 年 11 月 28 日
回答済み: Greg Heath 2014 年 11 月 29 日
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)');

採用された回答

Greg Heath
Greg Heath 2014 年 11 月 29 日
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 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by