Question

How do you track an object and plot its motion against time?

I'm trying to track the motion of a point on an oscillating pendulum and plot it's displacement versus time graph. I know i hav...

27 days ago | 1 answer | 0

Question

Extracting Multiple X values for a certain Y value from a plot?

I need to find the value of time at all the crests and troughs of the displacement (at displacement =pi/4=0.7854), i.e, Y value ...

2 months ago | 1 answer | 0

Question

Error in Cumtrapz?

Hi, i'm trying to integrate acceleration of a simple pendulum twice to get the displacement, and i've plotted it against time. ...

2 months ago | 1 answer | 0

Question

How do i replace Euler's method with ode45?

Hi, I'm trying to replace the Section of the code that uses Euler's methos to solve the ode by ode45, and i have the individual...

2 months ago | 1 answer | 0

Question

Animating a pendulum: error in code

Hi guys, i'm trying to plot the oscillatory motion of a simple pendulum in the form of a GIF or AVI file and i'm trying the fo...

2 months ago | 1 answer | 0

Question

Numerically integrating Acceleration to get displacement?

I want to rephrase my last question, as i was not very clear there. What i am trying to do is integrate the following second ...

2 months ago | 1 answer | 0

Question

Numerical integration of an ODE?

Hey! I'm trying to integrate the following 2nd order ODE: from time t=0 to any random time, say t=50 seconds and A are ...

2 months ago | 1 answer | 0

Question

Erasemode error: How do i correct it?

Tried running this code i found in Rudrapratap for the animation of a 2D bar pendulum. I'm getting the following errors: Wa...

2 months ago | 1 answer | 0

Answered

How do i add a function that needs inputs to the main code? (Nonlinear pendulum code)

i tried modifying it the way you explained but i think i have made a mistake somewhere: pend_l function xdot = pend_l(t1,x,wsq...

How do i add a function that needs inputs to the main code? (Nonlinear pendulum code)

i tried modifying it the way you explained but i think i have made a mistake somewhere: pend_l function xdot = pend_l(t1,x,wsq...

2 months ago | 0

Question

How do i add a function that needs inputs to the main code? (Nonlinear pendulum code)

Hi guys, I have the following two functions, pend_l and pend_n and the script file pend_solve. the functions contain a variab...

2 months ago | 2 answers | 0

Question

I just need this one TINY code to execute :( Any idea what the problem with this simple equation is?

I need to put this Either in another function or as a seperate function. Or the script. It's accepting L, M, and b values, but i...

2 months ago | 1 answer | 0

Question

Is there anything wrong with my code? It's about the non linear pendulum

Just wondering if the placement of wsq is correct here? i've put the values of L, L1, and d in th script. pend_cn...

2 months ago | 0 answers | 0

Question

Equation of motion of Non linear pendulum

tspan=[0,2*pi]; u0=[pi/4;0]; [t,u]=ode45(@pendulum,tspan,u0,[]); plot(t,u(:,1),'b-', 'LineWidth', 2) xlabel('time') ylabel(...

2 months ago | 1 answer | 0

Question

Non linear pendulum code

I've been trying to run this code, for a non linear pendulum, but i get the following errors: for the function---- Not enough...

2 months ago | 2 answers | 0