Write a program to calculates the standard deviation, MATLAB Programming

Assignment Help:

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


Related Discussions:- Write a program to calculates the standard deviation

Simple related plot functions, Simple Related Plot Functions: The othe...

Simple Related Plot Functions: The other functions which are useful in customizing plots are the figure, clf, hold, leg-end, and grid. The short description of such functions

Compute a reasonable vector for lower bound and upper bond, You are a quant...

You are a quant analyst reporting directly to a portfolio manager. Your manager requires you to generate a simple code to compute several statistics for the following potential por

Matlab code using ant colony algorithm, Ant Colony Optimization for Optimiz...

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

Print the day of the week, how to write a program to determine the day of ...

how to write a program to determine the day of the week. using GUI.

Help me..., construct a matlab program to calculate and to plot the electro...

construct a matlab program to calculate and to plot the electron and hole concentration as a function of the Fermi-level in an energy gab of Si at a Given temperature and the carri

Matlab code to run simulations of a batch reactor , Background Protein ther...

Background Protein therapeutics are a major component of the biotechnology industry, with sales estimated in the range of ~$99bn annually (2011) and steady market growth. Many phar

Plot function, The Plot Function: We will begin with a very simple gra...

The Plot Function: We will begin with a very simple graph of one point using the plot function. The script, plotonepoint, below plots only one point. To do this, at first the

Functions, Need help with creating functions in matlab.

Need help with creating functions in matlab.

Calculate the bandwidth of this filter matlab, The purpose of this lab is ...

The purpose of this lab is to enhance the ECE311 student's understanding of filter behavior and filter design and to provide the student the opportunity to demonstrate skills in li

Write Your Message!

Captcha
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