Probability of matrix greater than multiple scalars

1 Ansicht (letzte 30 Tage)
Sameer
Sameer am 13 Mai 2014
Beantwortet: Image Analyst am 13 Mai 2014
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

Antworten (1)

Image Analyst
Image Analyst am 13 Mai 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.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by