Menu

An abrupt stop of continuation with "Unrecognized function or variable 'idx2'."

Help
2022-07-02
2022-07-05
  • Evgenij Gr.

    Evgenij Gr. - 2022-07-02

    Hello!

    This is the problem that I have encountered few times while doing continuation in MATCONT. I am using MATLAB R2021b with MATCONT7p3. This message is cryptic to me, even last warning and error in MATLAB output does not help to understand in what direction I should look in order to fix something.

    Thanks in advance for the help!

     

    Last edit: Evgenij Gr. 2022-07-02
    • hilmeijer

      hilmeijer - 2022-07-02

      Your message does not contain any details of what you are doing, so it is hard to guess.
      idx2 appears when we select eigenvalues for processing Hopf and other bifurcations.
      Perhaps such a bifurcation was detected (see commandline) or you were trying to start such a continuation but it was not within numerical tolerances?


      Van: discussion@matcont.p.re.sourceforge.net discussion@matcont.p.re.sourceforge.net namens Evgenij Gr. evgenijgr@users.sourceforge.net
      Verzonden: zaterdag 2 juli 2022 20:21
      Aan: [matcont:discussion] 762215@discussion.matcont.p.re.sourceforge.net
      Onderwerp: [matcont:discussion] An abrupt stop of continuation with "Unrecognized function or variable 'idx2'."

      Hello!

      This is the problem that I have encountered few times while doing continuation in MATCONT. I am using MATLAB R2021b with MATCONT7p3. This message is cryptic to me, even warnings and errors in MATLAB output does not help to understand in what direction I should look.

      Thanks in advance for the help!


      An abrupt stop of continuation with "Unrecognized function or variable 'idx2'."


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/matcont/discussion/762215/

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

       
      • Evgenij Gr.

        Evgenij Gr. - 2022-07-02

        Oh, I can provide the necessary details for continuation that experienced this trouble. I can provide the system and step-by-step instructions to reproduce the error later, should I provide any additional information?

         
        • hilmeijer

          hilmeijer - 2022-07-02

          Yes, provide those details.
          Only then can we see if it is feature or an error


          Van: discussion@matcont.p.re.sourceforge.net discussion@matcont.p.re.sourceforge.net namens Evgenij Gr. evgenijgr@users.sourceforge.net
          Verzonden: zaterdag 2 juli 2022 21:13
          Aan: [matcont:discussion] 762215@discussion.matcont.p.re.sourceforge.net
          Onderwerp: [matcont:discussion] Re: An abrupt stop of continuation with "Unrecognized function or variable 'idx2'."

          Oh, I can provide the necessary details for continuation that experienced this trouble. I can provide the system and step-by-step instructions to reproduce the error later, should I provide any additional information?


          An abrupt stop of continuation with "Unrecognized function or variable 'idx2'."


          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/matcont/discussion/762215/

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

           
          • Evgenij Gr.

            Evgenij Gr. - 2022-07-03

            So, in order to reproduce the error, follow these steps.

            Step 1
            Use the system

            Coordinates
            g1,g2,g3,g4

            Parameters
            r,a,b

            Equations
            g1'=-0.2*r*sin(b - 2*g1) + 0.2*r*sin(b + 2*g1) - 0.2*r*sin(b - 2*g2) - 0.2*r*sin(b - 2*g3) - 0.2*r*sin(b - 2*g4) + 0.2*r*sin(b + 2*g1 - 2*g2) + 0.2*r*sin(b + 2*g1 - 2*g3) + 0.2*r*sin(b + 2*g1 - 2*g4) + 0.2*sin(a - g1) - 0.2*sin(a + g1) + 0.2*sin(a - g2) + 0.2*sin(a - g3) + 0.2*sin(a - g4) - 0.2*sin(a + g1 - g2) - 0.2*sin(a + g1 - g3) - 0.2*sin(a + g1 - g4)
            g2'=-0.2*r*sin(b - 2*g1) - 0.2*r*sin(b - 2*g2) + 0.2*r*sin(b + 2*g2) - 0.2*r*sin(b - 2*g3) - 0.2*r*sin(b - 2*g4) + 0.2*r*sin(b - 2*g1 + 2*g2) + 0.2*r*sin(b + 2*g2 - 2*g3) + 0.2*r*sin(b + 2*g2 - 2*g4) + 0.2*sin(a - g1) + 0.2*sin(a - g2) - 0.2*sin(a + g2) + 0.2*sin(a - g3) + 0.2*sin(a - g4) - 0.2*sin(a - g1 + g2) - 0.2*sin(a + g2 - g3) - 0.2*sin(a + g2 - g4)
            g3'=-0.2*r*sin(b - 2*g1) - 0.2*r*sin(b - 2*g2) - 0.2*r*sin(b - 2*g3) + 0.2*r*sin(b + 2*g3) - 0.2*r*sin(b - 2*g4) + 0.2*r*sin(b - 2*g1 + 2*g3) + 0.2*r*sin(b - 2*g2 + 2*g3) + 0.2*r*sin(b + 2*g3 - 2*g4) + 0.2*sin(a - g1) + 0.2*sin(a - g2) + 0.2*sin(a - g3) - 0.2*sin(a + g3) + 0.2*sin(a - g4) - 0.2*sin(a - g1 + g3) - 0.2*sin(a - g2 + g3) - 0.2*sin(a + g3 - g4)
            g4'=-0.2*r*sin(b - 2*g1) - 0.2*r*sin(b - 2*g2) - 0.2*r*sin(b - 2*g3) - 0.2*r*sin(b - 2*g4) + 0.2*r*sin(b + 2*g4) + 0.2*r*sin(b - 2*g1 + 2*g4) + 0.2*r*sin(b - 2*g2 + 2*g4) + 0.2*r*sin(b - 2*g3 + 2*g4) + 0.2*sin(a - g1) + 0.2*sin(a - g2) + 0.2*sin(a - g3) + 0.2*sin(a - g4) - 0.2*sin(a + g4) - 0.2*sin(a - g1 + g4) - 0.2*sin(a - g2 + g4) - 0.2*sin(a - g3 + g4)

            I choose all derivatives to be computed symbolically.

            Step 2
            I start with a point that lies close to a limit cycle. For that I use Type -> Initial Point -> Point and then use these values:
            r = 0.173, a = 1.60, b = -1.58
            g1 = 3.72022653,
            g2 = 4.60930634,
            g3 = 1.01568365,
            g4 = 2.50209747

            I take Interval equal to 45 -- slightly larger than limit cycle period, but less than twice the period (I remember this is the best case for MATCONT to reliably find periodic orbit, am I correct?). I chose integrator to be ode87 with RelTolerance 1e-9 and AbsTolerance 1e-9, other integrator properties are chosen as default. Compute->Forward, then View Result, "LC Select Cycle" and I choose tolerance to limit cycle equal to 1e-4.

            Step 3
            After that I choose "a" and "Period" as continuation parameters, then Compute->Forward. It must find an LPC bifurcation soon.

            Step 4
            I select LPC point, choose "a" and "b" as continuation parameters (I do not choose any branch parameters) and press Compute->Forward. Soon it will find an R1 point, I press Resume, and right after I get an error message from my question.

             

            Last edit: Evgenij Gr. 2022-07-03
            • hilmeijer

              hilmeijer - 2022-07-04

              Dear Evgenii,

              Indeed that's an error. You could check the command-line where we dump info.

              What happened: Your multipliers are +1,+1 and 0.9502 and 1.0524. The product of the latter is 1, so the Neimark-Sacker test function will be zero at this Neutral saddle-LPC. The code would report a LPNS, and did not check for this, and would try to compute the normal form, but this will fail as the selection of a complex multiplier with modulus 1 fails.

              Quick workaround for you: uncheck the box for LPNS detection.
              Workaround to be implemented: Check that idx2 is not empty on line 32 of nf_LPNS.m in case of a neutral saddle, otherwise stop computing normal form.

              Thanks for reporting!

              Best regards, Hil Meijer


              Van: discussion@matcont.p.re.sourceforge.net discussion@matcont.p.re.sourceforge.net namens Evgenij Gr. evgenijgr@users.sourceforge.net
              Verzonden: zondag 3 juli 2022 07:53
              Aan: [matcont:discussion] 762215@discussion.matcont.p.re.sourceforge.net
              Onderwerp: [matcont:discussion] Re: An abrupt stop of continuation with "Unrecognized function or variable 'idx2'."

              So, in order to reproduce the error, follow these steps.

              Step 1
              Use the system

              Coordinates
              g1,g2,g3,g4

              Parameters
              r,a,b

              Equations
              g1'=-0.2*r*sin(b - 2*g1) + 0.2*r*sin(b + 2*g1) - 0.2*r*sin(b - 2*g2) - 0.2*r*sin(b - 2*g3) - 0.2*r*sin(b - 2*g4) + 0.2*r*sin(b + 2*g1 - 2*g2) + 0.2*r*sin(b + 2*g1 - 2*g3) + 0.2*r*sin(b + 2*g1 - 2*g4) + 0.2*sin(a - g1) - 0.2*sin(a + g1) + 0.2*sin(a - g2) + 0.2*sin(a - g3) + 0.2*sin(a - g4) - 0.2*sin(a + g1 - g2) - 0.2*sin(a + g1 - g3) - 0.2*sin(a + g1 - g4)
              g2'=-0.2*r*sin(b - 2*g1) - 0.2*r*sin(b - 2*g2) + 0.2*r*sin(b + 2*g2) - 0.2*r*sin(b - 2*g3) - 0.2*r*sin(b - 2*g4) + 0.2*r*sin(b - 2*g1 + 2*g2) + 0.2*r*sin(b + 2*g2 - 2*g3) + 0.2*r*sin(b + 2*g2 - 2*g4) + 0.2*sin(a - g1) + 0.2*sin(a - g2) - 0.2*sin(a + g2) + 0.2*sin(a - g3) + 0.2*sin(a - g4) - 0.2*sin(a - g1 + g2) - 0.2*sin(a + g2 - g3) - 0.2*sin(a + g2 - g4)
              g3'=-0.2*r*sin(b - 2*g1) - 0.2*r*sin(b - 2*g2) - 0.2*r*sin(b - 2*g3) + 0.2*r*sin(b + 2*g3) - 0.2*r*sin(b - 2*g4) + 0.2*r*sin(b - 2*g1 + 2*g3) + 0.2*r*sin(b - 2*g2 + 2*g3) + 0.2*r*sin(b + 2*g3 - 2*g4) + 0.2*sin(a - g1) + 0.2*sin(a - g2) + 0.2*sin(a - g3) - 0.2*sin(a + g3) + 0.2*sin(a - g4) - 0.2*sin(a - g1 + g3) - 0.2*sin(a - g2 + g3) - 0.2*sin(a + g3 - g4)
              g4'=-0.2*r*sin(b - 2*g1) - 0.2*r*sin(b - 2*g2) - 0.2*r*sin(b - 2*g3) - 0.2*r*sin(b - 2*g4) + 0.2*r*sin(b + 2*g4) + 0.2*r*sin(b - 2*g1 + 2*g4) + 0.2*r*sin(b - 2*g2 + 2*g4) + 0.2*r*sin(b - 2*g3 + 2*g4) + 0.2*sin(a - g1) + 0.2*sin(a - g2) + 0.2*sin(a - g3) + 0.2*sin(a - g4) - 0.2*sin(a + g4) - 0.2*sin(a - g1 + g4) - 0.2*sin(a - g2 + g4) - 0.2*sin(a - g3 + g4)

              I chose all derivatives to be computed symbolically.

              Step 2
              I start with a point that lies close to a limit cycle.
              For that I use Type -> Initial Point -> Point and then use these values:
              r = 0.173, a = 1.60, b = -1.58
              g1 = 3.72022653,
              g2 = 4.60930634,
              g3 = 1.01568365,
              g4 = 2.50209747

              I take Interval equal to 45 -- slightly larger than limit cycle period, but less than twice the period (I remember this is the best case for MATCONT to reliably find periodic orbit, am I correct?). I chose integrator to be ode87 with RelTolerance 1e-9 and AbsTolerance 1e-9, other integrator properties are chosen as default. Compute->Forward, then View Result, "LC Select Cycle" and I choose tolerance to limit cycle equal to 1e-4.

              Step 3
              After that I choose "a" and "Period" as continuation parameters, then Compute->Forward. It must find an LPC bifurcation soon.

              Step 4
              I select LPC point, choose "a" and "b" as continuation parameters (I do not choose any branch parameters) and press Compute->Forward. Soon it will find an R1 point, I press Resume, and right after I get an error message from my question.


              An abrupt stop of continuation with "Unrecognized function or variable 'idx2'."


              Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/matcont/discussion/762215/

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

               
              • Evgenij Gr.

                Evgenij Gr. - 2022-07-05

                Dear Hil Meijer,

                thank you for your help! I guess I'll uncheck LPNS box for now. I also have two questions that are slightly related to my initial one: 1) is it possible in MATCONT to take, for example, R1 bifurcation point and continue it (as a curve) in three-dimensional parameter space? I don't remember seeing such example in the tutorials that I've read though... 2) is there a tutorial with a troubleshooting guide for when any of the default parameters should be changed, like number of mesh intervals or steps for predictor-corrector?

                Thank you a lot for your help!

                 
                • hilmeijer

                  hilmeijer - 2022-07-05
                  1. For now, we will stick to two-parameter continuation in the GUI. If you really need to, it should be feasible to add the testfunctions for R1 to the LPC-continuation. But then the resulting 3-parameter continuation has to be done in commandline mode (not impossible though).
                  2. No, that is so system-specific that I cannot predict what you'll need but it depends on timescales mostly. Here experience will tell.

                  Van: discussion@matcont.p.re.sourceforge.net discussion@matcont.p.re.sourceforge.net namens Evgenij Gr. evgenijgr@users.sourceforge.net
                  Verzonden: dinsdag 5 juli 2022 17:25
                  Aan: [matcont:discussion] 762215@discussion.matcont.p.re.sourceforge.net
                  Onderwerp: [matcont:discussion] Re: An abrupt stop of continuation with "Unrecognized function or variable 'idx2'."

                  Dear Hil Meijer,

                  thank you for your help! I guess I'll uncheck LPNS box for now. I also have two questions that are slightly related to my initial one: 1) is it possible in MATCONT to take, for example, R1 bifurcation point and continue it (as a curve) in three-dimensional parameter space? I don't remember seeing such example in the tutorials that I've read though... 2) is there a tutorial with a troubleshooting guide for when any of the default parameters should be changed, like number of mesh intervals or steps for predictor-corrector?

                  Thank you a lot for your help!


                  An abrupt stop of continuation with "Unrecognized function or variable 'idx2'."


                  Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/matcont/discussion/762215/

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

                   

Log in to post a comment.