Probability of matrix greater than multiple scalars

1 view (last 30 days)
It should report to the screen probabilty of achieving NPV larger than some specified NPV (which is in the 10X1 matrix swtNPVProb.
our individual scalars are set up in a 10X1 matrix swtNPVProb = [-15000 -10000 -5000 0 5000]';.
the Npv's calculated from the program are in a 5000X1 matrix.
What should I do here? and if only two or some other number of probabilities is desired, then entries 3 to 10 should be set of swtNPVProb should be set to NaN.
Please help, as this assignment is due tomorrow. Thanks

Answers (1)

Image Analyst
Image Analyst on 13 May 2014
Get the probability by taking the histogram and normalizing it. Then get the cumulative distribution function by using cumsum. Then your answer is 1 - cdf(theValue). That's the percentage. Give it a shot. It's only like 5 or 6 lines so I'm sure you can do it.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!