(3 points) This problem is just a simple review of functions and descriptive sta
ID: 3550032 • Letter: #
Question
(3 points) This problem is just a simple review of functions and descriptive statistics. Create a MATLAB function named "problem1", which accepts a number, a vector OR a matrix input and returns 4 outputs (in this order) related to the input: arithmetic average (mean), standard deviation, median, max. The numbers you return for each output should be single numbers not vectors.
NOTE: For this question, you are not allowed to use mean2 and std2 (i.e. matrix related functions). If you use them, you will receive an error message. Also make sure you are not printing any output messages to the command window. This will be marked as wrong answer.
Explanation / Answer
function [ a,b,c,d ] = problem1(youNumber) a=mean(youNumber(:)); b=std(youNumber(:)); c=median(youNumber(:)); d=max(youNumber(:)); end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.