Purchase Solution

Matlab script for statistics and histogram

Not what you're looking for?

Ask Custom Question

(See attached file for full problem description)

Any help is greatly appreciated, as the script I wrote does not seem to be deciphering between the two sets of data.

---
Write a Matlab script using the "randn" command to generate a vector of 10,000 random numbers that are normally distributed around zero, with a variance of 1. Use the "hist" command to plot a histogram of these data, specifying 50 bins. Use "find" command to determine what percentage of the data points lie within 1 standard deviation of the mean (which is zero). Redo this analysis for a smaller set of data (20 points) and reduce number of bins in the histogram.
---

Attachments
Purchase this Solution

Solution Summary

The expert examines Matlab script for statistics and histograms.

Solution Preview

I attach file task33.m:

it is a MatLab program which does what is requested in 3.3.doc you posted.

It calculates the random numbers, plots histograms, and finds the fractions within one sigma for 10000 numbers - 50 bins - drawn in Figure 101
and for
20 numbers - 5 bins - drawn in figure 102

I hope is helps and the comments in the file are sufficient.

The function
ret = within1sigma(x)
just creates another vector (instead ...

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Basic Networking Questions

This quiz consists of some basic networking questions.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

C# variables and classes

This quiz contains questions about C# classes and variables.