Question: ENGR - 1 2 5 Project 6 : MATLAB Functions and Solver Due Date: April 1 4 , 2 0 2 4 Part A: MATLAB

ENGR-125
Project 6: MATLAB Functions and Solver
Due Date: April 14,2024
Part A: MATLAB Functions
Write a function in MATLAB that will calculate and return the slope and y-axis 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 [mb]=eline(x1,y1,x2,y2)
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 statreport(a)
Write a function to calculate whether a given number is a prime number (code/logic to calculate the prime number is provided in class activity 9). Please do not use the built-in 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 'SanAntonio_temp.xlsx' into
Octave.
Read data.
Find the maximum and minimum of average temperatures.
Plot temperatures.
Call the function you wrote for Q4 to convert temperatures from Fahrenheit to Celsius.
Write the maximum and minimum Celsius temperatures to a text file.
Part B: Solver and Curve-fitting
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 'data1.xlsx' and find the best curve which fits time vs total truck.
ENGR - 1 2 5 Project 6 : MATLAB Functions and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!