i have to make 3 net inside the loop so that i can have 3 nets to be saved for future use with load command. sheetno is the running variable attached to net so that i can have net1, net2 and net3 after the completion of the loop
Programming in Matlab. i need net1, net2 and net3 constructed. but i have only net replaced 3 times. the variable net might be unused is the warning. please help
5 次查看(过去 30 天)
显示 更早的评论
for sheetno=1:3
dn1='net' ;
dn2=num2str(sheetno);
net=[dn1 dn2];
net=fitnet(10);
end
3 个评论
Walter Roberson
2016-12-20
"Is there any variable declaration like static which can be made non-static later in the program?"
No. The only variable declarations are global and persistent
采纳的回答
Walter Roberson
2016-12-20
In your situation I would save the values inside a structure using dynamic field names. Then save() the structure using the -struct option.
7 个评论
Walter Roberson
2017-4-27
inpsam=input('input sample number','s');
openn=strcat('net',inpsam);
filedata = load('mynets',openn);
saved_net = filedata.(openn);
output = saved_net(featureset1');
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!