Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Homework 7 For each of the problems in this homework assignment, write a separate MATLAB m-file. The name of each m-file must be exactly as
Homework 7 For each of the problems in this homework assignment, write a separate MATLAB m-file. The name of each m-file must be exactly as specified in the corresponding problem statement. Submit your m-files by uploading to Canvas before the due date A p-file (an encrypted script file) for each of these problems is available on the Modules page of the course website. You can download these files and run them from the command line to see how your code should behave. Make the behavior of your code match that of the p-files For each of these problems in this assignment, you may want to create a separate m-file to use as a test bench. In these test bench m-files, you can define the vector or matrix, x, and call your m-file that operates on that vector or matrix. You MAY NOT use the following built in MATLAB functions: min.m, max.m, find.m, sort.m 1) Filename: MAE1090_HW7_1.m Write an m-file that determines the maximum value in a vector, x, and stores that maximum value as the variable y. Your m-file should work for both row and column vectors. For the purpose of testing and grading your m-file: DO NOT issue a clear command at the start of your m-file DO NOT define the vector x within your m-file. That vector should exist in the workspace prior to executing your m-file. Do not display y. This will be done by the script the grader uses to test your m-file. .Variable names (x and y) must be exactly as specified (lower case). 2) Filename: MAE1090 HW72.m Write an m-file that determines the row and column indices for all non-zero elements in a matrix, x. Row indices should be stored to the variable i, and column indices should be stored to the variable j
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started