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
Size function - Dimensions of matrix: For the matrix mat shown next, it has three rows and two columns, therefore the size is 3 × 2. The length is the larger dimension that is

Problem 1. Create a vector representing x coordinates of a measurement with 20 points between 0 and 10. Create another vector y representing fake measurements which are related to

Given the following image, 1 2 1 1 2 0 0 1 5 1 0 1

You will write functions • B=null basis(A,tol); • B=range basis(A,tol); The function null basis takes a matrix A as input, and outputs a basis for the null space of A, obtained via

conversion of decimal to binary

how to implement 3 out of 4 visual cryptography in MATLAB?

what equation equals 36

Goal: Learn how to do statistics, sorting and curve fitting in Matlab. Put all of those ".m" files in a folder called yourname_lab7, and zip the folder and submit it on the class w

how to create adjacency matrix for amino acids in matlab?

write a matlab program to calculate employee salary.