|
|
Josh Drayton wrote:
>
>
> Ok yeah i tried that and tried looking, i guess what my real
> question
> is, is how to structure a matlab program i have a gui function that
> was provided to me, I have no idea how to use it and i think i'm
> expected to create other functions as well but what goes in them
> how
> do u pass variables?
>
> i have created a training input var and a minmax var(matrix) to
> call
> the function net = newff(minmax,(9,1)), {'logsig' 'logsig'});
> i don't think the net variable is set up the right way tho cause it
> says it has 1 input when i actually need 9?
>
> Duane Hanselman wrote:
>>
>>
I haven't used Matlab's Neural Network toolbox, but I do know a thing
or two about Neural Networks, so a few pointers:
Firstly,
net = newff(minmax,(9,1)), {'logsig' 'logsig'});
is not a valid Matlab syntax; the number of brackets do not match.
Functions tend to take the form:
[output1, output2]=MyFunc(input1,input2);
Secondly, according to
<http://www.mathworks.com/access/helpdesk/help/toolbox/nnet/nnet.html?BB=1>
the way you specified the layer sizes are wrong. I'm surprised
Matlab hasn't spit it right back at you. It is expecting a row
vector for the second input. You needed to say [9 1] rather than
(9,1).
The transfer functions look OK.
You also need 3 further parameters (see the help).
For any Matlab function, built-in or otherwise, type
help MyFunc
in Matlab and it should give you the usage, a short explanation of
the algorithm and an example of MyFunc (provided the author bothered
to write the help).
As for Matlab function layout, type
edit MyFunc
where MyFunc is a built-in Matlab function.
It will open MyFunc's source code in an editor. I suggest you DON'T
actually edit it, but you can set break points and debug through it
to learn how things work.
Lastly, about GUI's. From my limited experience with them, trying to
work out how one of them works when you haven't figured out anything
else about Matlab is suicide. Work out how you can get Matlab to do
what you want from the command window first, then think about doing
GUI's.
|
|