Week 2- 2R Robotic Arm Challenge
ploting operation robotic arm movement depend upon the angle variation,
% Robotic arms working function
close all
clear all
clc
%inputs length arms & angle of the direction
L1=1;
L2=0.5;
theta1 = linspace(0,90,4);
theta2 = linspace(0,90,4);
%Ploting of variables
%for looping every THERA 1& THETA 2 Angle
ct=1;
for i=1:length(theta1);
THETA1=theta1(i)
for j=1:length(theta2);
THETA2=theta2(j)
% Robotic arm axis values
Y0=0;
X0=0;
X1=L1*cosd(THETA1);
Y1=L1*sind(THETA1);
X2=X1+L2*cosd(THETA2);
Y2=Y1+L2*sind(THETA2);
% ploting axis
plot([X0 X1],[Y0 Y1],[X1 X2],[Y1 Y2],'linewidth',2);
axis([-0.1 1.5 0 1.5]);
pause(1.0)
N(ct)=getframe(gcf);
ct=ct+1;
end
end
movie(N)
videofile=VideoWriter('movement.avi','uncompressed AVI');
open(videofile);
writeVideo(videofile,N);
close(videofile);
*Casesensitive error when compiling for Plot() to change value plot()

Case sensitive error for [videoWriter] that change into[ VideoWriter]
File name input error throw out changed the file name to movement.avi

You tube video uploding link:https://youtu.be/_pQWLWSsLb0
googledrive link:https://drive.google.com/file/d/1u6_rM4R6JySNdG00wxK7bV95-G2zRl29/view?usp=sharing