- Details
- Parent Category: Programming Assignments' Solutions

# We Helped With This MATLAB Programming Homework: Have A Similar One?

Category | Programming |
---|---|

Subject | MATLAB |

Difficulty | Undergraduate |

Status | Solved |

More Info | Differential Equations Assignment Help Online |

## Assignment Description

Dear Students,

Please find attached homework 4. Please write a separate .m file for each of the questions. For question

3 to 6 save the workspace as .mat file unless otherwise specified. Please add your name in the names of .mat and .m files (for eg. Question1_Suril.m Question1_suril.mat). This homework will be due at 11:55 PM on 10/27/2016.

Please let me know if you have any questions.

-Suril

Question 1. Write a MATLAB script to display following lines (use the function fprintf) (3 points).

1. Suril had 25% in First quiz

2. Suril worked ‘hard’ but had 25% in the first quiz

3. AB is the same as B/A

Question 2. For the function fprintf explain the difference between notations %f, %e, %d and %s using an example. (2 points)

Question 3. Use the MATLAB program written in question 5 of homework 3 (matrix Inverse). Modify the program such that the matrix A is input by the user using ‘input’ command.

Question 4. Consider following set of linear equations (5 equations, 5 unknowns). Where X1 to X5 are unknowns. A1 to E5 are coefficients and Y1 to Y5 are results. Write a MATLAB program to solve the equation. Ask user to input the values of A1 to E5 as matrix and Y1 to Y5 as secondary matrix.

Specifically ask user to input a 5 x 5 matrix and 1 x 5 matrix. (Use ‘input’) command.

A1*X1+B1*X2+C1*X3+D1*X4+E1*X5=Y1;

A2*X1+B2*X2+C2*X3+D2*X4+E2*X5=Y2;

A3*X1+B3*X2+C3*X3+D3*X4+E3*X5=Y3;

A4*X1+B4*X2+C4*X3+D4*X4+E4*X5=Y4; A5*X1+B5*X2+C5*X3+D5*X4+E5*X5=Y5;

Question 6. Write Matlab programs to solve following problems. (2 Points each) For each of the program also create a .mat file that will store the final output as described in each of the problems.

1.

For question 1 save the workspace such that you are saving the values of input (grades) as well as mean, std, median. Information of length of variable is not necessary.

2.

For question 2 Run program using 5 different values of T and R, which you can pick randomly. Store the output in the workspace file which will contain the heat index, T and R (as a separate column matrices) (1 point) and a combined matrix (3x5) where each column represents the values of T, R and heat index (1 point).

3.

For question 3, save the whole workspace.