Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming Assignments Introduction to Programming with MATLAB Lesson 7 Unless otherwise indicated, you may assume that each function will be given the correct number of
Programming Assignments Introduction to Programming with MATLAB Lesson 7 Unless otherwise indicated, you may assume that each function will be given the correct number of inputs and that those inputs have the correct dimensions. For example, if the input is stated to be three row vectors of four elements each, your function is not required to determine whether the input consists of three two-dimensional arrays, each with one row and four columns. Unless otherwise indicated, your function should not print anything to the Command Window, but your function will not be counted incorrect if it does. Note that you are not required to use the suggested names of input variables and output variables, but you must use the specified function names. Also, read the instructions on the web page on how to test your functions with the auto-grader program provided, and what to submit to Coursera to get credit. Note that starred problems, marked by ***, are harder than usual, so do not get discouraged if you have difficulty solving them. You need MATLAB r2012a or newer or MATLAB Online to run the grader! Older versions are not supported. 1. Write a function called integerize that takes as its input a matrix A of integers of type double, and returns the name of the \"smallest\" signed integer class to which A can be converted without loss of information. If no such class exists, the text 'NONE' is returned. For example, if the smallest element of A is -100 and the largest is +100, then the function would return 'int8'. As another example, if there is an element of A equal to -1e20, then the function would return 'NONE'. 2. Write a function called year2016 that returns a row-vector of struct-s whose elements correspond to the days of a month in 2016 as specified by the input argument. If the input is not an integer between 1 and 12, the function returns the empty array. Each struct should contain three fields with these (exact) field names: \"month\
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