Matlab Coding Expert Needed to remove error in Code -- 2

Job ID: 32911247

Budget: $10 – $30 USD

Hi,
I'm looking for an expert in Matlab to help me writting a code. Please see the requirements here


clc

clear
%%Make an animated plot of a 3D a 3-link arm, with each link drawn as a hexagonal prism. The arm links should be 1, 1, and 1 units long. The first two links should be along the x
%axes of their local frames, and the third link should be along the y axis of its frame. The joint motions should be respectively around the z, y, and z axes.
%In the animation, the arm should start out with the links horizontal (all joint angles 0), and then should fall under the effects of gravity.
%In addition to standard Matlab functions, your code may assume that you have access to the following function(s) you created in previous assignments (along with the functions
%that they themselves call):
% chain inertia matrix
% matrix derivative
%- gravitational moment
%- joint_friction
%- EulerLagrange_trajectory
%threeD_robot_arm_inks
%- draw links
%threeD_update_links
%- create axes
%Remember that for these functions, the grading script will use the instructor's copy of the functions.

function [link_vectors,...
joint_axes,...
T,...
a_start,...
sol,...
alpha,...
ax,...
link_set,...
l,...
link_set_history] = ME317_Assignment_falling_arm
% Make an animated plot of a robot arm falling under the effect of gravity

%%%%%%%%%%%%%%%%%%%%%%%
% Specify the system structure (link vectors, link_radii, and joint
% axes)

% Specify link vectors as a 1x3 cell array of 3x1 vectors, named
% 'link_vectors'


% Specify link radii as 1/20 the link length



% Specify joint axes as a cell array of the same size as link_vectors, named 'joint_axes'



%%%%%%%%%%%%%%%%%%%%%%
% Generate the system dynamics functions (inertia,
% derivative-of-inertia, and force)

% Generate the system inertia function 'M_function' as an anonymous
% function that takes in a single input, uses that input as the
% 'joint_angles' input to 'chain_inertia_matrix', and takes the rest of
% the 'chain_inertia_matrix' inputs from the system information
% specified above



% Generate the system inertia derivitive function 'dM_function' by
% applying 'matrix_derivative' to 'M_function', with the number of
% configuration variables taken from the system information above



% Generate the forcing function 'F_function' on the system by constructing an
% anonymous function that takes in time, configuration, and
% configuration velocity, uses them to evaluate both the
% 'gravitational_moment' and 'joint_friction' functions, and sums the
% result. ('gravitational_moment' needs additional inputs, which should
% be taken from the system information above)





%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set up time-span and initial conditions for the simulation

% Specify the time-span 'T' as being from zero to thirty


% Specify the starting configuration 'a_start' as being zero for all
% joint angles


% Specify the starting velocity for the system 'adot_start' as being
% all zeros (i.e., the system starts at rest)






% Set up a figure in which to animate the motion of the arm as it falls
% under gravity

% Create figure and axes for the plot using 'create_axes', and store
% the handle in a variable named 'ax'


% Specify colors of links as a 1x3 cell array named 'link_colors'. Each
% entry can be either a standard matlab color string (e.g., 'k' or 'r')
% or a 1x3 vector of the RGB values for the color (range from 0 to 1)


% Generate a cell array named 'link_set' containing start-and-end
% points for the links


% Draw a line for each link, (using threeD_draw_links) and save the handles
% to these lines in a cell array named 'l'



% Use 'view(ax,3)' to get a 3-dimensional view angle on the plot


% Use axis(ax,'vis3d') to make the arm stay the same size as you rotate
% it





over the columns of alpha