What matlab function should be used to determine what the


Q1. You cannot the limits on the axes in MATLAB.

TRUE

FALSE

Q2. In C the printf function will print the entire contents of an array.

TRUE

FALSE

Q3. A for loop is required to print out the elements of a structure in C.

TRUE

FALSE

Q4. The subscript 0 corresponds to the first element of an array in MATLAB.

TRUE

FALSE

Q5. In C it is not possible to create an array of structure.

TRUE

FALSE

Q6. There can be no more than 20 members in a structure.

TRUE

FALSE

Q7. The member operator, ",", is used to access the members of a structure.

TRUE

FALSE

Q8. In MATLAB a user defined function can only return one value.

TRUE

FALSE

Q9. MATLAB is a great tool for creating data plots quickly.

TRUE

FALSE

Q10. A string is a one dimensional array characters.

TRUE

FALSE

Q11.  Arrays in C can have _______ dimensions.

A. no less than two

B. no more than 4

C. more than 100

D. none of the above  

Q12. Which command would find the MATLAB function that calculates the standard deviation of a vector:

A. doc standard deviation

B. clc

C. look for 'standard deviation'

D. help 'standard deviation'

Q13. Which is the best song ever:

A. Baby

B. Boyfriend

C. U Smile

D. Love me

E. One Time

F. Justine Bieber songs are like children.

G. You have to love them all equally

Q14. Typpedef struct circle

{

double radius;

double center_x;

double center_y;

} Circle;

Please write the statement needed to declare and initialize a structure of type Circle. The radius is 5, center x coordinate of 3.5, and center y coordinate of -5.2. Remember this requires only one line.

Q15. Write the MATLAB command needed to create a vector t that begins with -2 and progresses to 10 at increments of 0.25.

Now write a MATLAB statement to square each element in t and add five to the result.

Q16. Declare a structure for holding information about a car. It should hold the model name, year , and mileage.

Use typedef to give the structure a name that does not require struct when creating an instance of it.

Q17. a)  Write a C statement to declare an array buff with 200 characters:

b) Write a C statement to declare a two dimensional array wind. The array must be able to hold a 5 by 6 table of data.

c) Write a C statement to declare an astray of four doubles g initialized with the value 1.8, 4, 12.98, and -0.3;

Q18. The U.S. Geological Survey is doing a survey of the Red River of the North. They are flying a UAV over the river and using a radar to get depths of the river bed. This is basically like taking depth readings along a slice of the river. The flow rate of the river is proportional to the area of the slices. To be able to predict river levels they need to read in the data captured by the UAV and calculate the area of the slices. Then print out the corresponding areas. To get the area of a slice, multiply each river depth by the radar beams width, 100 ft, and sum the values. There are three readings per slice.

1730_Figure.png

Step 1: State the problem

Step 2: Input and outputs

Step 3: Work hand example

Step 4: Develop the algorithm

Q19. The MATLAB starting point for a function is:

function ( output_args ) = Untitled( input_args )

%UNTITLED Summary of this function goes here

%  Detailed explanation goes here

end

a) Please give the first line to a MATLAB function that has three inputs: a, h, and c. The function should return the sum and average of the corresponding numbers. The function's name should be "sum_ave_three.

b) Provide the body of the function that calculates each value being returned.

c) Call the created function to find the sum and average of 3, 7, and 2. Store the results in my_sum and my_ave.

Q20. Describe two of the three types of data files. Provide a pro and con of each.

Q21. Please convert the following to MATLAB statements. Assume t and x are vectors.

a) 5+6*31.85/35+711.5

b) g = 25/1.3*t3 - 2.9*t2+28

c) w = 1.54 * sin2(x * π) + 0.678 * sin (x * π) + 15.32

Q22. What MATLAB function should be used to determine what the command/function sqrt does?

Q23. What is the best learning activity you have done in a class at UND?

Attachment:- Algorithm Q18.rar

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: What matlab function should be used to determine what the
Reference No:- TGS01583304

Expected delivery within 24 Hours