Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Matlab Questions rart 1 liz questions@ 2 points each 24 points) Directions: Fill

ID: 3873550 • Letter: M

Question

Matlab Questions

rart 1 liz questions@ 2 points each 24 points) Directions: Fill the blanks in the questions below with the terms from the will be used, while some terms may be used more than once "Word Bank". Not all terms Bank- output m-file scrip e vector workspace input commandwindow scalar comphent requireents arrayp debugging matrix labóratory lar comment requirements array algorithm ma functión repetition operator pseudocode ax 1. A(n) is a set of steps used to solve a problem 2. Given: x = [14 7:4 6 9; 1 2 8], x is an example of what type of MATLAB array? Given: y = [14 7 4 6 9 1 2 8], y is an example of what type of MATLAB array? files contain a collection of MATLAB statements that can be executed sequentially as a program is the collection of all variables and arrays that can be used The MATLAB when a particular command or m-file is executing. to assign the values The statement z = [0:05:10] uses the from 0 to 10 in increments of 0.5 to the variable "z" 7. "MATIAB" is the acronym (abbreviation) for- A(n) value is stored as a simple array with 1 row and 1 column 9. A MATLAB is denoted by the % symbol, and can be used to annotate executable code The process of locating and fixing errors in MATLAB programs is called Step #2 of the "Top-Down Design Technique" is to define the required by the to be produced by the program program and the is used for directly entering interactive commands into 12. The MATLAB

Explanation / Answer

1. An algorithm is a set of steps used to solve a problem.

Algorithm is a step by step solution to a problem

2. given x =[1 4 7;4 6 9;1 2 8], x is an example of what type of matlab array? matrix

This is a 3x3 array of 9 elements. Hence, a amtrix.

3. given y =[1 4 7 4 6 9 1 2 8], y is an example of what type of matlab array? vector

In this above array all the elements are defined in a single row hence, it is a row vector array.

4.   m-files files contain a collection of matlab statements that can be executed sequentially as a program.

m-file or script files has matlab commands, when the file will run matlab will read the commands and execute accordingly. It has extension '.m'

5. The MATLAB   workspace is the collection of all variables and arrays that can be used when a particular command or m-file is executing.

6. The statement z =[0:0.5:10} uses the vector to assign the values from 0 to 10 in increments of 0.5 to the variable "z".

The colon operator is used to create regularly spaced vectors, index into arrays

7. MATLAB is the acronym(abbreviation) for matrix laboratory.

MATLAB is acronym of Matrix Laboratory known for mathworks,etc.

8. A scalar value is stored as a simple array with 1 row and 1 column

scalar is a single value.Hence, one row and one column.

9. A MATLAB comment is denoted by the % symbol, and can be used to annotate executable code.

The percent (%) sign is commonly used in MATLAB to indicate nonexecutable text within the body of a program.

10. The process of locating and fixing errors in MATLAB programs is called debugging.

11. Step #2 of the "Top-Down Design technique" is to define the pseudocode required by the program and the output to be produced by the program.

12. The Command Window is used for directly entering interactive commands into MATLAB.