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
Output Statements: disp and fprintf: The Output statements display strings and the answers of expressions and can permit for formatting or customizing how they are exhibited.

#create a matlab GUI for designing common emitter amplifier which produces AC load lines based on the component values

For the signal with four harmonics (first to fourth) that can be obtained from the script, do the following: a)  Place the time domain signal for the case in which all the harmo

Example of Variables and assignment statements: The expression is computed and then that value is stored in the variable. For illustration, this is the way it would appear in

how to reverse the digits of positive number by using mod function?

The purpose of this assignment is to use Matlab/Simulink to analyse and simulate a mathematical model of an electromechanical system. This system comprises two component subsystems

Order of precedence: As with the numerical operators, it is significant to know that the operator precedence rules. Table below shows the rules for the operators which  have b

Consider the 3rd order Bessel function J3(x). Write a script findBessRoots.m that computes all the roots of J3(x) in the interval [0; 40]. Your script must store the roots of the f

please show me how this is coded in MATLAB

The fundamental theorem of calculus states that the de?nite integral of a function may be found from the antiderivative of the function. However, for many functions, it is much eas