Write a function called matrix summary

Assignment Help MATLAB Programming
Reference no: EM13712061

Question- Write a function called matrixsummary that takes in one argument, a matrix or a vector, and returns four output values - the sum, mean, max and min of all the values in the matrix or vector.

Do not use Matlab's built-in functions to accomplish this task - instead you should use nested for loops to traverse the entire vector or matrix one element at a time.

You should keep track of the sum, max and min each time you traverse an element. The mean can be computed after you have traversed the whole matrix or vector.

Here is sample output below:

    >> v = [ 1, 10, 12, 15, 5, 2, 3 ];

    >> [sum,mean,max,min] = matrixsummary(v)

sum = 48

mean = 6.8571

max = 1

min = 15

Prepare a function called matrixsummary that takes in one argument, a matrix or a vector, and returns four output values.

I was hoping someone can describe on a high level as to how this happens.

Reference no: EM13712061

Questions Cloud

Find ip address of your computer : Find IP Address of your computer(My IP Address: 192.168.1.5) - What is the length (#bytes) of the IP Address?
Find the closed from for tn : Find the closed from for T(n)= 4T (n/2) where T (1) =1 ( Tip: suppose n is a power of 2) - You have to evaluate the given question and provide all the computation.
Write the complete code for a public java class : Write the complete code for a public Java class called Change Machine that can hold nickels, dimes and quarters. Include a private instance variable to hold each type of coin that the machine hols.
Explain the synthesis of guar gum : Explain the synthesis of guar gum - Explain the life cycle and environmental impact of guar gum
Write a function called matrix summary : Write a function called matrixsummary that takes in one argument, a matrix or a vector, and returns four output values - the sum, mean, max and min of all the values in the matrix or vector.
Drawing stack frames for stacks and heaps : can explain on a high level as to how this happens. I'm not expecting a lengthy answer, just something accurate for my understanding!
Calculates a result needed for a physics lab on ballistics : Program that calculates a result needed for a physics lab on ballistics. Using the angle of the launch and the initial velocity, the program will calculate how far the object traveled.
Exchange currency over a 3-year period : Suppose the U.S. yield curve is flat at 5% and the euro yield curve is flat at 3%. The current exchange rate is $1.3 per euro. What will be the swap rate on an agreement to exchange currency over a 3-year period?
Draw a line joining the first two points : Write a program that allows the user to specify a triangle with three mouse presses - Draw a line joining the first two points. After the third mouse press, draw the entire triangle.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Design a normalized lowpass analog filter

Design a normalized lowpass analog filter by using one of Matlab's routines: buttap, cheb1ap, cheb2ap, ellipap to get your analog poles

  Kerfuffleboard is a game very much like shuffleboard

Kerfuffleboard is a game very much like Shuffleboard. Players take turns shooting disks at a trianglular scoring area. While the scoring areas are the same in shuffleboard and kerfuffleboard, a disk's contribution to a player's score will be calcu..

  Receives one number as an input argument

Write a function per2 that receives one number as an input argument. The function has a persistent variable that sums the values passed to it. Here are the first two time the function is called

  The power input p to a centrifugal pump is assumed to be a

the power input p to a centrifugal pump is assumed to be a function of the volume flow rate q impeller diameter d

  Design and implement in matlab an algorithm for lcs problem

Find the longest common subsequence of any two sequences of symbols which have no repeated symbol.

  Create a matrix of 5x6

Prepare a matrix of 5x6. with identical columns and rows ranging from 200 to 1000 in equal increments

  Hi i attached the instructions would you guys do it by 50

i attached the instructions. ltbrgt ltbrgtwould you guys do it by 50 dollars ? ltbrgt ltbrgtit is due this friday

  Considered to equal when the result of one array subtract

Two arrays are considered to be equal when the result of one array subtracted from the other is an array of zeros. In the script file, create the MATLAB commands to prove the following relationships (use arrays that you makeup yourself)

  Filtering – biomedical application

Prepare a filter that removes noise produced by electronic medical equipment.

  Create a function that returns true i

Create a function that returns true if the input is a numeric matrix and false otherwise.

  Find an equation for the surface of the sphere

Find the spherical coordinates for point P and find an equation for the surface of the sphere.

  Compare two sound wave in matlab

Compare two sound wave in matlab as on speech to text processing and open as notepad, calculator,C:,D: and many other on speaking

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd