All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Solving second order ODEs Aim: to purpose of this project is to create Solving second order ODEs using matlab Equation: Objectives: the objective of this project is to Solving second order ODEs of a pendulum swinging freely Programme: clear all close all clc b=0.05; (damping…
Asad Ali Baig Mirza
updated on 08 Mar 2022
Solving second order ODEs
Aim:
to purpose of this project is to create Solving second order ODEs using matlab
Equation:
Objectives:
the objective of this project is to Solving second order ODEs of a pendulum swinging freely
Programme:
clear all
close all
clc
b=0.05; (damping coefficient)
g=9.81;(gravity in m/s2)
l=1;(length of the pendulum in m)
m=1;(mass of the ball in kg)
%initial conditions
theta_0=[0;3];
%time points
t_span=linspace(0,10,500); time frame at which the pendulum is swinging
ct=1;
%solve ODE
[t,results]=ode45(@(t,theta) ode_func(t,theta,b,g,l,m),t_span,theta_0);
hold on
plot(t,results(:,1))
plot(t,results(:,2))
ylabel('plot')
xlabel('time')
M(ct)=getframe(gcf);
ct=ct+1;
movie(M)
videofile = VideoWriter('ode_main.mp4');
open(videofile)
writeVideo(videofile,M)
close(videofile)
Conclusion:
the free moment of pendulum is plotted in the graph as shown below & In the attached video.
Note:Due to short video size i am unable to upload the video on youtube ,however i have attached the video in the attached
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Radar Mast & Final Assembly of Yacht
Radar mast: Front view Side view Top view Expanded feature tree of Radarmast …
08 Mar 2023 06:59 PM IST
Week - 4
Implement control logic of a “washing machine” using Stateflow as per given sequence: If the power supply is available, the system gets activated If the Water supply is not available, stop the process & indicate through LED Soaking time should be 200s followed by Washing time of 100s. Then rinsing…
06 Apr 2022 07:06 PM IST
Week -2
Aim: 1)Make a Simulink model of Doorbell using solenoid block. 2)Use a thermistor to sense the temperature of a heater & turn on or turn off the fan. Solenoid: A solenoid is a type of electromagnet formed by a helical coil of wire whose length…
06 Apr 2022 04:28 PM IST
Project 1 - Parsing NASA thermodynamic data
Aim: To write a code to parse the thermodynamic data file provided and then calculate the thermodynamic properties of various gas species Objective: 1)Write a function that extracts the 14 co-efficients and calculates the enthalpy, entropy and specific heats for all the species in the data file. 2. Calculate the…
01 Apr 2022 05:25 PM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.