Error in MATLAB

hello everyone,
I am using MATLAB 7 Neural Networks toolbox. I am trying to execute the code. But getting errors that i could not resolve.
the errors are:

??? Error using ==> network.subsref
Error using ==> eval
Index exceeds matrix dimensions.

Could anyone plz help me understand them. I am using toolbox to predict certain values. I referred this link ( Predicting The Lottery With MATLAB® Neural Network – Script Bucket ) and followed the same steps, but get the above errors.

Please help.

Replies

  • durga ch
    durga ch
    please check the input matrix you have defined and the output oubtained. I have encountered this error, generally when I do multiplication and end up having more rows or columns that what i defined earlier.
  • patil.ashu01
    patil.ashu01
    durga
    please check the input matrix you have defined and the output oubtained. I have encountered this error, generally when I do multiplication and end up having more rows or columns that what i defined earlier.
    hey. Thanks for replying. But i have 1*37(1 row 37 columns in 1 matrix) and 2*37(2 rows 37 columns in another matrix.) I am not multiplying these matrices. But giving the inputs (2*37 matrix) and targets (1*37 matrix) to the neural networks (feedforward). And train the system. and just while testing this network when I give the inputs, i get this error. Can you please help me in MATLAB neural networks? I am a newbie to MATLAB and finding it really tough.
  • durga ch
    durga ch
    ok.. I am not familiar with neural network toolbox, but as I understand you are trying to feed in weekday and time of the weekday as cpinputs and the winning number as cptarget. what you might have not done is doing a transpose as mentioned by the author(step 9). I religiously followed the steps provided by the author and could arrive to the desired outcome.
  • patil.ashu01
    patil.ashu01
    durga
    ok.. I am not familiar with neural network toolbox, but as I understand you are trying to feed in weekday and time of the weekday as cpinputs and the winning number as cptarget. what you might have not done is doing a transpose as mentioned by the author(step 9). I religiously followed the steps provided by the author and could arrive to the desired outcome.
    I followed all the steps they have mentioned. i did the transpose even. But i am getting that error. I am using MATLAB 7. Do we need to do any initial settings or something?? I dont know how to proceed. And thanks a lot for replying.
  • patil.ashu01
    patil.ashu01
    patil.ashu01
    I followed all the steps they have mentioned. i did the transpose even. But i am getting that error. I am using MATLAB 7. Do we need to do any initial settings or something?? I dont know how to proceed. And thanks a lot for replying.
    Also, as given in steps 6,7 and 8, in MATLAB 7 on clicking File menu I get Import Data wizard wherein I imported the .xls file. Finally got a variable generated in MATLAB (this contains the entire 3*3 matrix). Next, to select the 2 columns I double clicked on the variable generated in workspace. On selecting the 2 columns->right click-> select 'create variable from selection'. This generates another variable with the 2 columns that I renamed as cpInputs in MATLAB workspace. The same is done for cpTargets. Is this method right? Cause, otherwise as given in those 3 steps i dont get how to select the 2 columns and then hit Import button. There is no such option given.
  • durga ch
    durga ch
    I am using matlab 2008, i had little issue selcting columns as well, but this is how I have done, I moved the column from B and pasted in C and copied column C in B, now I had data from B(weekdays) and time (D) next to each other and selected. The target number was now in column B instead of C.
    I am atatching a doc for your assistance,
  • patil.ashu01
    patil.ashu01
    durga
    I am using matlab 2008, i had little issue selcting columns as well, but this is how I have done, I moved the column from B and pasted in C and copied column C in B, now I had data from B(weekdays) and time (D) next to each other and selected. The target number was now in column B instead of C.
    I am atatching a doc for your assistance,
    hey... Even I copy pasted the two columns for selecting them together. And thanks for the screenshots. I followed the same procedure, but get those errors. Have any idea how to proceed? This is related to my final year project. I am stuck. I cannot proceed without solving these errors. 😔

You are reading an archived discussion.

Related Posts

IES notification is out, and the details are available at upsc.gov.in. Here is the syllabus for Electrical Engineering! ELECTRICAL ENGINEERING (For both objective and conventional types papers) PAPER - I...
Anybody have idea that can we see our colleague activities using wireshark....Any idea from people using wireshark
When I first heard about it I felt what is so great about spending hours browsing other people’s images? But, here's an answer. Mashable published an Infographic - Do any...
Absolute Zero and Four Year Transform: This is my first attempt at drawing with a Wacom tablet, so the results are a little scratchy. I promise a more consistent result...
hye , my name`s Neo and i would like to ask about Broadband Modem. Here we go with the 1st question. Which electronic components corresponding with the connection speed? may...