Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create MATLAB functions to evaluate the following mathematical functions and tes

ID: 3280117 • Letter: C

Question

Create MATLAB functions to evaluate the following mathematical functions and test them. To test your functions, you will need to create a script file called functiontest.m and call the functions within this script file. When you are done, copy all the function codes into functiontest.m at the beginning of this file as a commented paragraph.Here is how to create a commented paragraph: Put a percentage and curly brackets before and after the text. this is the commented paragraph Use publish command to submit your code for the functiontest.m file and the output showing the results from the functions you tested. 1·y(x) = x2 2. y(x)= sin(x2) for x=10 degrees 3 Using MATLAB's "meshgrid" function; for x= 10 f(x, y)=xy2 define x,y as x=4:6 y=1:2 forx 5 and y 3 5. Write a function called motion that calculates the velocity and distance of a car for a given value of time in seconds. Distance ( times ) / 12

Explanation / Answer

This is something that I understood from the problem.

{* problem 1
function y = functiontest(x)
y = x.^2;
*}

{* problem 2
function y = functiontest(x)
y = sin(x.^2);
*}

{* problem 3
function f = functiontest(x,y)
yf = x * y.^2;
*}

{* problem 4
function f = functiontest(x,y)
f = sqrt(5* x.^2 + 2) + y;
*}

{* probelm 5

function [distance,velocity] = functiontest(time)
distance = time.^3/12;
velocity = 3*time.^2/12; % calculated from the derivative of equation.

*}