Write a function called sizecheck that accepts two integer


Given the data (xi, yi) below with i =1, 2, ..., 6 for questions 1 to 3:

x (time)

y (velocity)

10

26

25

52

33

72

42

90

52

100

65

129

1. Plot the velocity versus time in excel using the scatter plot. Print your graph in a word document as part of your homework.

2. Compute the terms below.
a. ∑ ????

b. ∑ ????

c. ∑ ???? ????

d. ∑ ???? ∑ ????

e. (∑ ????)2

f. ∑ ??2

3. Compute the slope (m) and intercept (b) of the least squares line fit and substitute m and b by their values in the equation ??^ = ???? + ??

4. Compute the R2 value for this set of data and the linear curve fit computed in 3.

5. The two build-in Arduino functions setup and loop are passed no arguments and return no arguments and so are declared as void setup() and void loop(). For a general case, what is the syntax of a user-defined function's declaration?

6. Write a function called SizeCheck that accepts two integer arguments and returns a Boolean (TRUE/FALSE). The function should return a TRUE value only if the first integer is larger than the second integer (you can check the return of your user-defined function by using the Serial.print function in your void setup().

7. What argument is returned if a user uses the same number for both input arguments?
Use a word processor to include the source code and the result from the serial monitor for problems 6. And 7. (you can use the "PrintScreen" to obtain an image of the serial monitor).

Solution Preview :

Prepared by a verified Expert
Mechanical Engineering: Write a function called sizecheck that accepts two integer
Reference No:- TGS01688249

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)