"pendulum animation in octave" Code Answer's

You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "pendulum animation in octave" answered properly. Developers are finding an appropriate answer about pendulum animation in octave related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like pendulum animation in octave. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on pendulum animation in octave. 

pendulum animation in octave

By Lonely LocustLonely Locust on Apr 02, 2021
clear all
close all 
clc

%input
b=0.05;
g=9.8;
l=1;
m=1;

%initial conditions
initial=[0,3];

%time points
time=linspace(0,150,500);

%solve ode
[t,results]=ode45(@(t,theta) ode(t,theta,b,g,l,m),time,initial);

%plot
C=1

for a=1:length(results(:,1))
        x1=-l*sind(results(a,1))
        y1=-l*cosd(results(a,1))
     
        plot([0,x1],[0,y1],'linewidth',1)
        hold on
        plot(x1,y1,'O','color','r')
        
        axis([-.2,.2,-1.1,0])
        pause(.006)
         
        
        %storing frames in m
        K(C)=getframe(gcf)
        C=C+1
  
end


%creatig videofile for m
movie(K)
videofile=VideoWriter('forwardkinamatics.avi','uncompressed AVI')
open(videofile)
writeVideo(videofile,K)
close(videofile)



close all
plot(t,results(:,1))
hold on
plot(t,results(:,2))
axis([0,50,-8,8])
title("displacement vs velocity")
xlabel('time')
ylabel('plot')
legend('displacement','velocity')

Source: skill-lync.com

Add Comment

0

All those coders who are working on the Whatever based application and are stuck on pendulum animation in octave can get a collection of related answers to their query. Programmers need to enter their query on pendulum animation in octave related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about pendulum animation in octave for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of pendulum animation in octave while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "pendulum animation in octave". Visit this developer's friendly online web community, CodeProZone, and get your queries like pendulum animation in octave resolved professionally and stay updated to the latest Whatever updates. 

Whatever answers related to "pendulum animation in octave"

View All Whatever queries

Whatever queries related to "pendulum animation in octave"

Browse Other Code Languages

CodeProZone