Menu

Error in init_Data MATLAB/Simulink

KapersWiu
2017-03-23
2017-03-23
  • KapersWiu

    KapersWiu - 2017-03-23

    Hi everyone,

    I'm using a PC with MATLAB 2014a (32-bit) and Windows 7 (64-bit) on an Intel Core i5 CPU with 2:53 GHz and 8 GB memory.
    I downloaded the grampc, then I followed the steps of installing, according to manual.
    >> mex -setup

    The C compiler configured to use is 'lcc-win32'.

    Unpacked GRAMPC as described in Section 2.1.1, went to the Matlab directory
    >> cd ('D:\grampc_v1.0\matlab')

    To start the building process, followed:
    >> make clean

    >> make

    So, I tried to run an example of the MATLAB/SIMULINK in grampc_v1.0\matlab\examples\CRANE_2D. I started running with initData.m, but the following message appears:

    ">> initData
    Undefined function or variable 'grampcinitCmex'.
    Error in initData (line 34)
    grampc = grampcinitCmex(); "
    *

    I'd like some help in resolving this error!

    Best regards

     

    Last edit: KapersWiu 2017-03-23
  • Tobias Englert

    Tobias Englert - 2017-03-24

    Hello Willian UEL

    Thank you for your interest in GRAMPC.

    Before you can run the initData.m you have to compile the problem function.
    To this end you can either change the compile flag in the startMPC.m file from
    zero to one and run this file, or you can copy the make file from the example
    folder to the CRANE_2D subfolder and run make probfct_CRANE_2D.c

    Best regards

     
    • KapersWiu

      KapersWiu - 2017-03-25

      Thank you Tobias Englert for you help!
      I performed what you said ("change the compile flag in the startMPC.m file from
      zero to one and run this file"
      ), but the following message was displayed in command window of the MATLAB:

      startMPC
      Building probfct ...
      Building with 'lcc-win32'.
      MEX completed successfully.
      Building grampc_init_Cmex ...
      Building with 'lcc-win32'.
      Error using make (line 146)
      grampc_init_Cmex: Error during building process.
      Error in startMPC (line 64)
      make(PROBFCT);

      See the figure for more details.! !()

      https://drive.google.com/file/d/0B4pgHaIhCTWKRENnR2FqdnlvY2M/view?usp=sharing

       

      Last edit: KapersWiu 2017-03-25
  • KapersWiu

    KapersWiu - 2017-03-25

    I also tried "copy the make file from the example folder to the CRANE2D subfolder and run make probfctCRANE2D.c"

    But again unsucessfully.

    make probfct_CRANE_2D.c
    Building probfct ...
    Building with 'lcc-win32'.
    MEX completed successfully.
    Building grampc_init_Cmex ...
    Building with 'lcc-win32'.
    Error using make (line 146)
    grampc_init_Cmex: Error during building process.

    See the figure for more details

    https://drive.google.com/file/d/0B4pgHaIhCTWKbklLZGtYZzVlRFk/view?usp=sharing

     
    • Tobias Englert

      Tobias Englert - 2017-03-27

      Are you sure that you run
      make
      (and not make clean) in the folder 'D:\grampc_v1.0\matlab' before you run
      startMPC
      in the folder of the example, because your error message looks like you don't have any binary files in the 'D:\grampc_v1.0\matlab\bin' folder.

       
  • KapersWiu

    KapersWiu - 2017-03-31

    Tobias, I'm using the command make.
    Checked in the folder "C:\grampc_v1.0\matlab\bin'" (see the link of the figure) and there are the binary files.

    Link of the figure: https://drive.google.com/file/d/0B4pgHaIhCTWKWHpFYmtEaGo1d3c/view?usp=sharing

    I'm still having problems:

    startMPC
    Building probfct ...
    Building with 'lcc-win32'.
    MEX completed successfully.
    Building grampc_init_Cmex ...
    Building with 'lcc-win32'.
    Error using make (line 146)
    grampc_init_Cmex: Error during building process.
    Error in startMPC (line 64)
    make(PROBFCT);

    Again I come to thank you for all the support and attention ... all the help will be very valuable to me.

    What else could be causing this error?

     
    • Tobias Englert

      Tobias Englert - 2017-04-12

      Is the grampc folder part of your matlab path?
      If so, maybe the make file for the toolbox is used instead of the make file for the problem functions.
      So be sure that you do not have these folders in your matlab path.

      To be able to provide further support, it might be useful to see the original error message. To this end, rethrow the original error in the corresponding catch environment.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.