Menu

Problem Running Arrowhead Example

2014-05-07
2014-05-07
  • thomaswinberry

    thomaswinberry - 2014-05-07

    Hi, I'm very interested in your software but so far have not been able to get it to work. In particular every time I try to generate the derivative file using the "adigator" command I get a particular error. For example, I get the following when I run "main.m" in the arrowhead.m example in the basic1stderivatives folders:

    Subscript indices must either be real
    positive integers or logicals.

    Error in adigator (line 180)
    FILENAME =
    CalledFunctions{CFcount}(NameLoc(end)+1:end-2);

    Error in main (line 11)
    gy =
    adigator('arrowhead',{gx},'arrowhead_dx',adigatorOptions('overwrite',1));

    Any help would be appreciated. Thanks!

     
    • Anil V. Rao

      Anil V. Rao - 2014-05-07

      What version of MATLAB are you using? Can you give me more specifics of the errors?

      Anil V. Rao, PhD
      Associate Professor
      Department of Mechanical and Aerospace Engineering
      University of Florida
      Gainesville, FL 32611-6250
      Tel: 352-672-1529 (cell)
      Email: anilvrao@gmail.com

      On May 7, 2014, at 12:14 PM, "thomaswinberry" thomaswinberry@users.sf.net wrote:

      Hi, I'm very interested in your software but so far have not been able to get it to work. In particular every time I try to generate the derivative file using the "adigator" command I get a particular error. For example, I get the following when I run "main.m" in the arrowhead.m example in the basic1stderivatives folders:

      Subscript indices must either be real
      positive integers or logicals.

      Error in adigator (line 180)
      FILENAME =
      CalledFunctions{CFcount}(NameLoc(end)+1:end-2);

      Error in main (line 11)
      gy =
      adigator('arrowhead',{gx},'arrowhead_dx',adigatorOptions('overwrite',1));

      Any help would be appreciated. Thanks!

      Problem Running Arrowhead Example

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/adigator/discussion/bugs/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • Matthew J. Weinstein

    Thomas,

    Thanks for your interest.

    I'm not sure exactly what the issue here is, but it seems as if adigator isn't finding the proper path of the arrowhead.m file.

    If you place a keyboard command just prior to the error line in the adigator file (line 180), you should have the following information:

    CFcount - should be 1
    NUMcf - should be 1
    CalledFunctions - should be 1x1 cell
    CalledFunctions{1} - should be string of full path of arrowhead function (i.e. 'Users/matt/adigator/examples/basic1stderivatives/arrowhead/arrowhead.m')
    NameLoc - should be integer locations of all of the forward slashes in the file location

    What I am guessing is that for some reason CalledFunctions{1} is either coming back empty or not returning the full file path.

    If you are able to check this that would be a great help, also, what OS and MATLAB version are you running?

    -Matthew Weinstein

     
  • thomaswinberry

    thomaswinberry - 2014-05-07

    Thanks for both of your prompt replies! I am running R2013b on Windows 7.

    I've placed the keyboard command and have some information. CFcount, NUMcf, CalledFunctions, and CalledFunctions{1} are all as you guessed they should be. However, NameLoc is just empty, that is, returns "[]".

    I took a look at the adigator.m code and noticed that NameLoc is finding '/', ie a forward slash. However the directory is actually separated by '\', ie a backslash. When I make this substitution into the definition of NameLoc in line 179, everything works fine.

    Thanks again for your help! I hope this is somehow useful for you guys.

     
  • Matthew J. Weinstein

    Great thank you. I had everything coded for the forward slash separator (coded on mac), changed this to use MATLAB's 'filesep' command instead and released new version (0.3.1). Please let us know if you find any more issues.

     

Log in to post a comment.

MongoDB Logo MongoDB