Write a program to calculates the standard deviation, MATLAB Programming

Write a program that reads in numbers (of type double) from a file, stores them in an array, and then calculates the mean, variance, and standard deviation.  

Your program should solve the problem by using the following methods implemented in a class..named Calculate.java  

This class should implement the following methods:

1.  One method to count the number of data numbers in the input file. This method should:

o  be public and static

o  be named  countData

o  accept a String representing the filename

o  return an integer that represents the number of numbers in the data file

2.  One method to read the numbers and the data file. This method should:

o  be public and static

o  be named  readData

o  accept a String representing the filename, and a parameter for an array of type double

3.  One method to calculate the mean value

This method should:

o  be public and static

o  be named  calMean

o  accept an array of type double

o  return the calculated mean as a number of type double

4.  One method to calculate the variance

This method should:

o  be public and static

o  be named  calVariance

o  accept an array of type double and the calculated mean value as a double

o  return the calculated variance as a number of type double

Posted Date: 2/27/2013 6:54:02 AM | Location : United States







Related Discussions:- Write a program to calculates the standard deviation, Assignment Help, Ask Question on Write a program to calculates the standard deviation, Get Answer, Expert's Help, Write a program to calculates the standard deviation Discussions

Write discussion on Write a program to calculates the standard deviation
Your posts are moderated
Related Questions
drow midpoint circle for scan converting acircle in matlab

i have a project in matlab : modeling of development of an outer organ (hand,leg and head) i don''t know how to do it, my teacher said me, i have to make it easy, so, it means i s

Write a function called threshold2 (in a file called 'threshold2.m'). The function takes an arbitrary number of input variables. The first input variable, t, is required and is the

Design a controller which regulates flow and compensate pressure to my desire value in simscape.

what is matlab


Calling an User-Defined Function from Script: Now, we will change our script which prompts the user for the radius and computes the area of a circle, to call our function cal

Variable numbers of arguments: In the functions there have been a fixed number of input and output arguments. For illustration, in the function below, there is one input argum

How can I separate a row vector into groups.

Ant Colony Optimization for Optimization of Route path taken Ant Colony Algorithm is a potential candidate for coupled, 3D optimisation. Ant Colony Algorithm enjoys the overall