Question

MATLAN Quiz 2 Create a MATLAB function that calculates the average of values in a vector that also drops the slowest values.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

function ave=average_drop(v)
[i j]=min(v);
v(i)=[];
ave= mean(v);
end

calling function

clc
clear all
close
v=[1 2 3 4 5 6 7];
ave=average_drop(v);

Result

ave =

4.5000

Add a comment
Know the answer?
Add Answer to:
MATLAN Quiz 2 Create a MATLAB function that calculates the average of values in a vector that als...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Matlab: As the user to input 4 quiz grades and 2 test grades. Calculate the final and letter grad...

    Matlab: As the user to input 4 quiz grades and 2 test grades. Calculate the final and letter grade when quizzes are worth 50% of the grade and each test is worth 25% of the grade. Display the final grade to the tenth along with the letter grade.

  • using C# Write a program which calculates student grades for multiple assignments as well as the...

    using C# Write a program which calculates student grades for multiple assignments as well as the per-assignment average. The user should first input the total number of assignments. Then, the user should enter the name of a student as well as a grade for each assignment. After entering the student the user should be asked to enter "Y" if there are more students to enter or "N" if there is not ("N" by default). The user should be able to...

  • MATLAB ASSIGMENT 1. A. Create a function called ch16initials3 Input: row vector of 101 values (Note:...

    MATLAB ASSIGMENT 1. A. Create a function called ch16initials3 Input: row vector of 101 values (Note: input values are specified in the function call) Output: calculated maximum value Create a row vector A of values from 50 down to 0, with an increment of 0.5 Multiply the elements of A and the square of the elements of the input vector Store the results in B Find the maximum value of B and store it in C – this is the...

  • Create a mathlab code. Create MATLAB/Scilab code that calculates an average and a standard deviation of...

    Create a mathlab code. Create MATLAB/Scilab code that calculates an average and a standard deviation of 8 numbers. Use 2,0,3,0,6,9,4,0 as eight 1 digit numbers to be used for your calculation. Use the following formula for calculating the standard deviation. Use MATLAB function "std"/Scilab function "stdev" to calculate the standard deviation. Compare your result with the result produced by the function. Hypothesize the reason why they are different. (If you do not see a pattern, try different set of numbers...

  • Matlab/The following student grades need to be entered using the input function and stored in a...

    Matlab/The following student grades need to be entered using the input function and stored in a vector G. Use a while loop to accept the input from the keyboard, store the values and then compute the average of all the grades. You must use the while loop to do this work. Grades= 72, 77, 89, 78, 98, 79, 88, 87, 90, 85

  • 1) Create a matlab function that calculates: for Name your function TwoVarFunc : The inputs should...

    1) Create a matlab function that calculates: for Name your function TwoVarFunc : The inputs should be in the same order: xmin xmax ymin ymax N: n is the number of elements in the vector x and y The ouputs should be in the same order: f_xy: is the calculated array f(x,y) f_xyMAX: should be the the maximum value of the function f(x,y). Hint: to create vectors x and y look up the matlab built-in function linspace() Hint 2: To...

  • create an application that calculates the grades of students Wilbur Wright College CIS 142 C++ Programming...

    create an application that calculates the grades of students Wilbur Wright College CIS 142 C++ Programming Language Prof. Gustavo Alatta Lab #4 Points: 100 1.1. Create an application that calculates the grades of a group of students. The program must follow these specifications: - You need to declare 2 arrays: 1 single String array to contain the name of the students and the second a double two-dimensional to hold the grades of the students. - The program must allow the...

  • Special Problem: Automated Factorial Create a MATLAB function called xfact that uses a loop to calculate...

    Special Problem: Automated Factorial Create a MATLAB function called xfact that uses a loop to calculate the factorial of an integer. Your function should take a single integer input. Your function should compute the factorials of every integer from 1 to the integer provided by the input. Test your function by prompting the user to enter an integer N and, using a loop create an array named X of length N that contains the factorials of the numbers 1 to...

  • In this assignment, you will write a program in C++ which uses files and nested loops...

    In this assignment, you will write a program in C++ which uses files and nested loops to create a file from the quiz grades entered by the user, then reads the grades from the file and calculates each student’s average grade and the average quiz grade for the class. Each student takes 6 quizzes (unknown number of students). Use a nested loop to write each student’s quiz grades to a file. Then read the data from the file in order...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT