Question: MATLAB 1. Write a function, named Q1, which takes as an argument a positive integer n and computes the sum n+ (n 1) + (n
MATLAB
1. Write a function, named Q1, which takes as an argument a positive integer n and computes the sum n+ (n 1) + (n -2)+.1 2. Write a function, named Q2, which takes as an argument a vector v and a number x and counts the number of elements in the vector v that are greater than x. For example, Q4(14 36 17], 2) should compute 3 3. Write a function, named Q3, which takes as an argument a positive integer n and computes the sum 4. Write a function, named Q4, that draws a red octagon 5. Write a function, named Q5, which takes as an argument a matrix A and counts how many elements in the matrix A are divisible by 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
