Question: Complete Problem 1 and Problem 3 in MATLAB Create a single script (.m file) to complete this assignment. Unless directed otherwise, use meaningful variable names
Complete Problem 1 and Problem 3 in MATLAB
Create a single script (.m file) to complete this assignment. Unless directed otherwise, use meaningful variable names for each variable; do not use the default variable ans to store your results. For this assignment suppress your output with semi-colons (;). Each problem (i.e. Problem 1 and Problem 3) should be in a separate cell, using the cell mode feature of MATLAB; the subparts should all be contained in the same cell as the parent problem.

1 4 7 1. Consider the matrix A 9 3 4 Request the matrix from the user with the input command. With the find 6 8 2 command, use a print command to print these results to the Command Window: a) Programmatically count how many elements of the matrix A are equal to 4 b) Programmatically count how many elements of the matrix A are less than 5 or greater than 7. 3. The function f (z) ln(z) is defined over the real numbers (RI) for z E (0, oo) (though MATLAB will report In(0) as -Inf). Use an if selection structure to check in the inputted value of z is in the domain of f(z) according to these three cases: Case 1: If the inputted ac is not in the domain of f(z) ie. if a e oo,0), use the error command to print an error message to the Command Window. Case 2: If the inputted az is on the domain (0,1), use the warning command to print a warning to the Command Window stating that the value of f(z) will be less than 0. Case 3: If the inputted z is in the domain C1, oo) then calculate and print to the Command Window the value of f(z) Hint: What are the branches in this selection structure? Identify them first, then begin to program the cases. NB: The symbol e is a mathematical symbol that can be interpreted in English as "is an element of." For example, if z E 0,5] then ar is defined within (or "belongs to") that range of numbers. You will likely recall from calculus that parentheses indicate a specific interval does not include the end-point (a so-called "open interval"), while brackets indicate that the interval does include the end point (a so-called "closed interval")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
