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.
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.
|