MATLAB Animation & Kinematic Analysis of a Pendulum

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 28

  • @Makingroceries
    @Makingroceries 5 років тому +6

    This is the kind of knowledge that I would gladly pay someone else to learn.

  • @NikoBiele
    @NikoBiele 4 роки тому +2

    Thank you, this helped me :)
    I also have a couple of suggestions for your code...
    Since you are only working with vectors, you dont need the ,: in all the vectors, dunno if it makes a difference.
    I can also recommend using the 'axis equal' command before the xlim and ylim, this way you ensure that the length of the pendulum does not change.
    Lastly, if you would like to see the animation 'live' and not just after recording a video, you could use the 'pause(0.2)' function as the last part of the loop. :)

    • @ironpine5815
      @ironpine5815  4 роки тому

      Glad I could help!
      Yes, my array indices are rather redundant - since they're 1-D, I could just specify x(n) rather than x(n,:), etc.
      And yeah, 'axis equal' would help - didn't think of that!
      Thanks for the tip about viewing the animation 'live.'

    • @NikoBiele
      @NikoBiele 4 роки тому

      @@ironpine5815 I used your script as a basis for making this video ua-cam.com/video/MQlXfUSVuK0/v-deo.html. I also found out that you missed a '+1/2*alpha*tStep^2' term in your calculation of theta... However with small timesteps this error will be very small per timestep, but it will accumulate over time :)

    • @aminebounouna3528
      @aminebounouna3528 4 роки тому

      @@NikoBiele Please, I tried to add the term you mentioned but it appeared an error

  • @vinodpund1574
    @vinodpund1574 2 роки тому

    Thank you for your technical explained Newton's second law in very easy understand.

  • @AirInAirOut
    @AirInAirOut 5 років тому +1

    Ladies and gentlemen, he's back.

  • @yasinsharifi9181
    @yasinsharifi9181 3 роки тому

    Thanks for your video ,i have a question Is That a analytical or numerical solution?

    • @ironpine5815
      @ironpine5815  3 роки тому

      This is a numerical solution since I use Euler's method to solve the second order ODE.

  • @sirinesmaoui4035
    @sirinesmaoui4035 3 роки тому

    How can you execute the code inorder to get this video of the simulation ?

  • @RaviShankar-pw2ti
    @RaviShankar-pw2ti 2 роки тому

    how can I save this video in file manager, can you please tell me about that

  • @hansle170
    @hansle170 3 роки тому

    Why is the animation 16 seconds long when the simulation time is only 10 seconds? And I find that my animation becomes faster and has more oscillations when I increase the time step, which doesn't make sense to me since the simulation time is the same

  • @StellarHamster
    @StellarHamster 2 роки тому

    what could i do in order to have in the x axis the time in seconds and not the number of iterations? My goal is to reach a graph with accel. on y axis and time on x axis

    • @ironpine5815
      @ironpine5815  2 роки тому

      It's pretty simple to do. The simulation time step is set on line 12 of the MATLAB code (tStep). Create an array that increments by tStep that is the same length as your position, velocity, and acceleration arrays. Then you can plot using this "time" array.

    • @StellarHamster
      @StellarHamster 2 роки тому

      @@ironpine5815 can you write it for me? I barely can use matlab, I'm a lot ignorant in that and I'm on a nerve crisis because I'm working on something similar since this morning because I'm on a hurry. Sorry for asking but I really need help, if you can't write it down for me, at least please tell me how to do it step by step. Thanks and sorry again

    • @ironpine5815
      @ironpine5815  2 роки тому

      @@StellarHamster I think I explained it to you pretty step-by-step. I won't write the code for you though - if this is one of your assignments/projects/etc, then you need to be the one doing the work.

    • @StellarHamster
      @StellarHamster 2 роки тому

      @@ironpine5815 done this morning, thanks. Sorry for the panic, I learned something

    • @ironpine5815
      @ironpine5815  2 роки тому +1

      @@StellarHamster I'm glad you got it figured out!

  • @اوسالشمري-ه1ك
    @اوسالشمري-ه1ك 4 роки тому

    I really need this code. Can you please give it to me

    • @ironpine5815
      @ironpine5815  4 роки тому

      You can download the code using the links in the video description.

  • @عليعلي-و2ق3ب
    @عليعلي-و2ق3ب 3 роки тому

    Can you help me please
    Can you give me book modeling pandulum by matlab simulink

  • @kizilayk
    @kizilayk 3 роки тому

    How does this red point disappear and flash? Like an ambulance.. Tick tock

    • @kizilayk
      @kizilayk 3 роки тому

      Please help me

    • @ironpine5815
      @ironpine5815  3 роки тому

      @@kizilayk I don't know what you mean by "disappear and flash" - in the video that MATLAB exports, it should be smooth and the pendulum bob shouldn't disappear.

  • @warriorforjesus2980
    @warriorforjesus2980 3 роки тому

    In video code it showing that cannot create file pendulum.avi. permission denied tell me the solution for this

    • @ironpine5815
      @ironpine5815  3 роки тому

      I'm not sure how to resolve this issue. It appears to be something with your permissions on your computer - make sure MATLAB has permission to create files.