Array of neuralnet structs
显示 更早的评论
Hello everyone,
I'm using Matlab2010a and I do in a loop a several neural networks.
Then I'm trying to save all the neural networks, like above:
for k=1:20
clear cfnet1; clear tr;
cfnet1=newcf(P,T,2,{'tansig' 'tansig'});
cfnet1.trainParam.max_fail = 10;
cfnet1.trainParam.showWindow = 0;
[cfnet1,tr] = train(cfnet1,P,T);
TR(k)=tr;
NET(k)=cfnet1;
end
I can save all the 'tr' in an array, but in case of the neuralnet it is not possible.
Generates an error about arrays and not double values.
??? The following error occurred converting from network to double:
Error using ==> double
Conversion to double from network is not possible.
Did someone try it before ? Is it works in latest versions of Matlab ?
采纳的回答
更多回答(2 个)
Walter Roberson
2011-8-22
0 个投票
How exactly are you initializing NET ?
Tiago
2011-8-22
0 个投票
3 个评论
Walter Roberson
2011-8-22
Could it be that NET already has a value? Try
clear NET
before the loop.
Sean de Wolski
2011-8-22
I'm using braces, you're using parenthesis!
NET{k} is much different than NET(K)
Tiago
2011-8-23
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!