Question: 1. Write a function in MATLAB that will calculate and return the slope and y-axis intercept from coordinate values. The inputs to the function

1. Write a function in MATLAB that will calculate and return the 

1. 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: y = mx + b; where m is the slope of the line, (m=2-V) x2-x1 and b is the y-intercept (b = y -mx). Your function definition should look like this: function [m bl=eline (x1, yl, x2, y2) 2. Write a function that prints a statistical report for a vector 'a'. The report includes average, minimum, maximum value. Please print the report from the function. Your function definition should look like this: function statreport (a) 3. 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'. 4. Write a function to convert a Fahrenheit temperature to a Celsius temperature. 5. 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.

Step by Step Solution

3.51 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure Here are the solutions to your questions in MATLAB 1 Function to Calculate Slope and YInter... View full answer

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!