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 DIFFERINCAL EQUATION clear all close all clc b=0.05; g=9.81; l=1; m=1; %initial condition theta_0=[0;3]; %time points t_span=linspace(0,20,500); % solve ode [t,results]= ode45(@(t,theta) ode_func(t,theta,b,g,l,m),t_span,theta_0); % plotting figure(1) hold on plot(t,results(:,1)) plot(t,results(:,2))…
Arun Reddy
updated on 12 Dec 2021
*SOLVING SECOND ORDER DIFFERINCAL EQUATION
clear all
close all
clc
b=0.05;
g=9.81;
l=1;
m=1;
%initial condition
theta_0=[0;3];
%time points
t_span=linspace(0,20,500);
% solve ode
[t,results]= ode45(@(t,theta) ode_func(t,theta,b,g,l,m),t_span,theta_0);
% plotting
figure(1)
hold on
plot(t,results(:,1))
plot(t,results(:,2))
ylabel('plot')
xlabel('time(seconds)')
ct=1;
for i=1:length(results(:,1))
X_start=0
Y_start=0
X_end=l*sin(results(i,1))
Y_end=-l*cos(results(i,1))
figure(2)
plot([-1 1],[0 0],'linewidth',5)
hold on;
plot([X_start X_end], [Y_start Y_end],'LineWidth',3)
hold on;
plot(X_end,Y_end,'o','MarkerSize',20,'MarkerFaceColor','y')
title('animation of pendulam')
axis([-1.5 1.5 -1.5 1])
pause(0.0003)
hold off;
end
M(ct)= getframe(gcf);
ct=ct+1;
movie(M)
videofile=VideoWriter('pendulam animation.avi','Uncompressed AVI')
open(videofile)
writeVideo(videofile,M)
close(videofile)
VIDEO LINK
https://drive.google.com/file/d/1q3l7T-SAUXGX8kl0rBOY45A5NJdbly6P/view?usp=sharing
EXPLANATION
As we know the fixed parameter length , mass, damping coefficient ,accleration,gravity.
time is taken between 0 to 20 sec
by using ode45 command ODE function is introduced
by ploting we can see displacement in y axis against time in x axis
we can reduced the displacement by reducing damp coefficient
by using the loop command mass at various points and at various time are marked in the graph and are ploted
by using movie command we can save it to avi.file.....
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...
Project 1-Meshing of Rear Wheel Holder challenge
Aim :- Meshing of Rear Wheel Holder with mentioned quality criteria. OBJECTIVE: Extract the mid surface Geometry cleanup Meshing given door model using the given quality criteria checks Good mesh flow. Assign thickness PROCEDURE : Import the component and click F to see the component in the GUI area as shown below. As…
10 Jun 2023 03:22 PM IST
Week 7- Meshing of Backdoor Challenge
AIM: Mesh the backdoor model as per the given quality criteria using Hypermesh. OBJECTIVE: Extract the mid surface Geometry cleanup Meshing given hood model using the given quality criteria checks Good mesh flow. Assign thickness PROCEDURE : Import the component and click F to see the component in the GUI area as shown…
10 Jun 2023 03:21 PM IST
Week 6-Meshing of Hood Challenge
AIM: To extract the mid surface of the given component individually, mesh the obtained mid surface, and assign the thickness. The given model has to be imported and auto cleanup has to be done on the component then the mid surface has to be extracted from the components and have to be meshed individually with an average…
22 Jan 2023 12:06 PM IST
Week 4-1D Element Creation Challenge
THEORY: PROJECT METHODOLOGY: 1. MID SURFACE: Auto mid surface has been used to extract the midsurface for this simple bracket. Components has been created and assigned to the particular mid surfaces. 2. ASSIGN MATERIAL: Create material. Here I have created a material and assigned to steel. …
04 Jan 2023 11:52 AM 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.