Question: ENGR - 1 2 5 Project 6 : MATLAB Functions and Solver Due Date: April 1 4 , 2 0 2 4 Part A: MATLAB
ENGR
Project : MATLAB Functions and Solver
Due Date: April
Part A: MATLAB Functions
Write a function in MATLAB that will calculate and return the slope and yaxis intercept from coordinate values. The inputs to the function are the coordinate values.
Hint: The equation of a straight line: ;
where is the slope of the line,
and is the intercept
Your function definition should look like this:
function eline
Write a function that prints a statistical report for a vector
The report includes average, minimum, maximum value. Please print the report from the function.
Your function definition should look like this:
function statreporta
Write a function to calculate whether a given number is a prime number codelogic to calculate the prime number is provided in class activity Please do not use the builtin MATLAB function 'isprime'.
Write a function to convert a Fahrenheit temperature to a Celsius temperature. Your input to the function is the Fahrenheit temperature and output is the Celsius temperature.
Upload the file named 'SanAntoniotemp.xlsx into
Octave.
Read data.
Find the maximum and minimum of average temperatures.
Plot temperatures.
Call the function you wrote for Q to convert temperatures from Fahrenheit to Celsius.
Write the maximum and minimum Celsius temperatures to a text file.
Part B: Solver and Curvefitting
Evaluate the following function at :
Solve the following equation using 'solve' function in MATLAB:
Solve the following equations using 'solve' function in MATLAB:
Find the roots of the following equation using 'roots' in MATLAB:
Read the data in the attached excel file 'dataxlsx and find the best curve which fits time vs total truck.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
