MATLAB Project - Elbow
Project tasks
1. Function M-files
(a) Construct a MATLAB function M-file called theta.m, that takes as input the time t≥) (possibly an array of time values), and gives as output the corresponding value(s) of θ(t). your M-file will be of the following form:
% Your names, project name, date
function y=theta(t)
% A function to output the angle theta at any input time t.
% Should allow for the possibility that the input is an array
x = 15*cos(pi*t);
% alpha is angle OAB
alpha = atan(x/8);
% beta is angle BAP
beta =
y= pi - (alpha + beta);
Fill in the blank to complete this function M-file correctly.
(b) Create a similar function M-file called phi.m, that calculates the angle φ(t) given t.
(c) Your project report must include
- your derivation of the missing formula for the angle beta, and
- your derivaion of a formula for φ(t).