function [ann] = createnn(S,T)
x=0; source = S; targets = T;
[S2, ~] = size(targets);% Problem is here Error says
S1 = 70;
ann = newff(minmax(source),[S1 S2],{'tansig' 'tansig'},'traingda'); ann.LW{2,1} = ann.LW{2,1}*0.01; ann.b{2} = ann.b{2}*0.01; ann.performFcn = 'mse'; ann.trainParam.goal = 0.000000001; ann.trainParam.show = 20; ann.trainParam.epochs = 500000; ann.trainParam.mc = 0.95; S = source; T = targets; [ann,tr] = train(ann,S,T);
??? Error: File: createnn.m Line: 6 Column: 7 Unbalanced or unexpected parenthesis or bracket.

 Akzeptierte Antwort

Matt Fig
Matt Fig am 23 Apr. 2011

1 Stimme

You are running code which was written in a newer version of MATLAB. Your version does not recognize the tilde being used this way. Go through the code with ctr+f and replace all occurrences of ~ with the word junk.
For example, use this:
[S2, junk] = size(targets);% Problem is here Error says

2 Kommentare

Chanakya Jayasinghe
Chanakya Jayasinghe am 23 Apr. 2011
ThnX a lot
but tell me wt is da word of "junk"
Matt Fig
Matt Fig am 23 Apr. 2011
The word junk is just a placeholder. It has no meaning. You could use 'trash' instead of 'junk', or 'garbage' if you like. It simply lets a person reading your code know that this variable is not used in the code.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by