Program that prompts the user to enter grades in a loop

Assignment Help MATLAB Programming
Reference no: EM13167819

Define a function that takes two input parameters, a vector of test scores and a scalar passing grade. The function returns the fraction of passing grades as a number in the range [0 1] (so 0.3 means 30% of the grades were passing. Define the function without using any MATLAB library functions.

Write a main program that prompts the user to enter grades in a loop, ending on a negative number, stores the grades in a vector, and asks the user for a passing grade. Ten pass the grade vector and passing cutoff to the function and print the percent of passing grades.

Reference no: EM13167819

Questions Cloud

Find the mean - median and standard deviation : Find the mean, median, standard deviation, variance and range.(Use correct notation, you don't have to show work)
How many carbons does the sample contain : how many carbons does the sample contain
State eye of a hurricane is less than atmospheric pressure : The pressure in the eye of a hurricane is less than atmospheric pressure. Which one of the following pressure readings could not have been taken
How much chocolate would you have to consume : A 1.0 ounce piece of chocolate contains 15 of caffeine, and a 6.0 ounce cup of regular coffee contains 105 of caffeine.How much chocolate would you have to consume to get as much caffeine as you would from 5.0 cups of coffee?
Program that prompts the user to enter grades in a loop : Write a main program that prompts the user to enter grades in a loop, ending on a negative number, stores the grades in a vector, and asks the user for a passing grade. Ten pass the grade vector and passing cutoff to the function and print the per..
Compute the expectations of x and y : One of the 4 bus drivers is also randomly selected. Let Y denote the number of students on his bus. Compute the expectations of X and Y:
Create a database for managing our business : Evaluate the given statement and discuss some approaches to address the issue: "We spent several million dollars a few years ago to create a database for managing our business. In the past several months, we acquired a new business but its data does ..
Compute the required quantity of each reagent : Describe the preparation of 12 mL of a 0.050 M solution of each of the halogens, using the reactions in the preceding question. Available to you are solid Ca(OCl)2
What are venn diagrams : Imagine you are talking about your college math class over the family dinner table with your father, and he asks, "What are Venn diagrams?" Describe how you would explain them to him.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Compare two strings to determine if they are the same

Write a statement (or statements) that will compare two strings to determine if they are the same, ignoring whether the characters are upper or lower case.

  Consider a cstr with a feed stream

Consider a CSTR with a feed stream containing only A at a concentration of cA and the reactions A?B?C taking place in the CSTR. Both reactions are first order in the reactant

  T prints out, on a clear screen, a table of temperatures

Create a MATLAB program (utilizing a temp-conversion function) that prints out, on a clear screen, a table of temperatures.

  Create functions in file

Create Functions in File and how to code this function - Declare function inputs, and outputs

  Write a matlab program to generate a data file

1.) Write a Matlab program to generate a data file containing the names and corresponding telephone numbers of the customers. 2.) Using the data file created, write a program in Matlab to create a menu-driven facility to preform the following tasks

  Design and explain a computer-based simulation model

Design and explain a computer-based simulation model which you will use to estimate the probability that among 25, 50, 75, 100, 500, or 1000 randomly chosen people, at least 2 people share the same birthday.

  Mobile robot control and potential field

Write a MATLAB code to compute forces due to each obstacle and goal. Compute total force on vehicle at point(x,y).

  Write a function named ''read_line''

Verify that your code works by saving some text into a file (created in notepad / textedit) and saving the file with extension '.txt'. You should attach the file (call it 'test.txt') with your code.

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

  Let''s combine everything together

Let's combine everything together! In this question, you will be asked to combine scaling and translations. Write a function named "problem5" that accepts a single input and scales the image by 0.5 and shifts it up by 7 units. The input variable h..

  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)

  Division by zero is not possible

You must also ensure that division by zero is not possible. If the user tries to divide by zero, the calculation should not be attempted, and an error message should appear in the Result text box.

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