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

  Use regression algorithms

The proposal which are two pages and here is the demands - Use Regression Algorithms or any type to achieve the target In Data Mining matter dealing with E-Learning Students' Data.

  Matalb solution hello i have some questions that i need

hello ltbrgti have some questions that i need them to be solved ltbrgtq1 9.the cost of manufacturing n units where n

  Write a program to display all unit-step responses

Write a program that will read in a text string mixed with numbers and letters from the keyboard and count how many numbers there are in the string

  Parking in garage using matlab

In matlab: parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour.

  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.

  Calculate the geometric mean of numbers

Write a program to calculate the geometric mean of numbers entered by a user. The program should prompt the user to enter numbers and continue to accept the numbers until the user enters 999.

  Design the digital receiver system

Objective of the project is to design the digital receiver system of the 100-Base TX Ethernet provided in given that the transmitter is provided.

  The buffalo is running at 6 ms at 10 degrees south of east

while riding a horse at 8 ms at 25 degrees to the north of east a rider sees a buffalo he wants to shoot. the buffalo

  Develop a well-structured function

Develop a well-structured function to compute v as a function of t. Then use this function to generate a table of v versus t for t = -5 to 50 at increments of 0.5.

  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)

  Matlab i uploaded the requirments

i uploaded the requirments

  Write a system program for bus arbiter

The bus arbiter is a device used in multi-master system with shared bus. It is used to allocate the control of the shared system bus to one master at a time depending priority.

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