Question: Problem 2: Write a code that asks for a matrix from the user. This code should replace the non-integer elements of the matrix with zero.

Problem 2: Write a code that asks for a matrix from the user. This code should replace the non-integer elements of the matrix with zero. It also should replace the negative integer elements with -1. (Hint: A number is integer when x-ceil(x) = 0. or x-floor(x)-0). Apply you code to the following matrix: A=[ 2.9 4 5.8 9-10; 0-2 7-10.18.9; 16.2-8.43 2.25] ro ite a program in sible by 13 ot is greater than se a loop in am. The lo ou e progr and then prints the number Problem 4: Write a for-loop that asks for a vector and evaluates the following function for the elements of the given point 0 f(x) (x -1) 2 213x3 3 r > 3 a) Run your code for Vector -10 -4 -2 -1 -1.5 1 1.25 0.5 2.2 3 6] b) Plot the values of the function versus the given input. Each point should be shown as a circle. Do not connect the points
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
