COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

matlab back propogation neural network

• Follow

```hi ppl....
i hv the following code in matlab

p=[Vf1max;Vf2max;Vdmax;Vf1min;Vf2min;Vdmin;Vf1avg;Vf2avg;Vdavg];
t=[0 1];
net=newff(p,t,3);
[net,tr]=train(net,p,t);
a = sim(net,p);

i got an error as follows:

??? Error using ==> network.train at 146
Targets are incorrectly sized for network.
Matrix must have 1 columns.

Error in ==> test at 161
[net,tr]=train(net,p,t);

someone plz help me regarding this...
```
 0
Reply srikanthkurni 5/11/2010 4:57:22 PM

```srikanthkurni <srikanthkurni@gmail.com> wrote in message <564766261.118769.1273611477776.JavaMail.root@gallium.mathforum.org>...
> hi ppl....
> i hv the following code in matlab
>
> p=[Vf1max;Vf2max;Vdmax;Vf1min;Vf2min;Vdmin;Vf1avg;Vf2avg;Vdavg];
> t=[0 1];
> net=newff(p,t,3);
> [net,tr]=train(net,p,t);
> a = sim(net,p);
>
> i got an error as follows:
>
> ??? Error using ==> network.train at 146
> Targets are incorrectly sized for network.
> Matrix must have 1 columns.
>
> Error in ==> test at 161
> [net,tr]=train(net,p,t);
>
> someone plz help me regarding this...

What is the size of your input?. You have output [0 1], yet you have 3 sets of input.

Or maybe something like this:
input =
a1 a2 a3
b1 b2 b3
c1 c2 c3

output =
0 1 1
1 0 0

your first observation is (a1 b1 c1), and your target is (0 1).

if you can clarify...
```
 0
Reply ade77 5/11/2010 10:21:04 PM

```It may be that the problem is this:

> t=[0 1];

which has 2 columns. The error message says:

> Targets are incorrectly sized for network.
> Matrix must have 1 columns.

So your target matrix has 2 columns and the message says it must have 1 column. Check the documentation to see what the correct dimensions for the target are. It may be that t = [0; 1] would be OK (this has one column) but it may not be so simple.
```
 0
Reply David 5/12/2010 9:06:03 AM

2 Replies
660 Views

(page loaded in 4.978 seconds)

Similiar Articles:

7/21/2012 5:58:27 PM

 Reply: