2R Robotic Arm
Objective: %Forward motion of a robotic arm l1=2; %Length of link1 l2=0.5; %Length of link2 c=1; %Counter theta1=linspace(0,90,10); %Varying angles of link1 theta2=linspace(0,90,10); %Varying angles of link2 for i=1:length(theta1) THETHA1=theta1(i); for j=1:length(theta2) THETHA2=theta2(j); x0=0; y0=0; x1=l1*cosd(THETHA1);…