フィルターのクリア

Probability of matrix greater than multiple scalars

1 回表示 (過去 30 日間)
Sameer
Sameer 2014 年 5 月 13 日
回答済み: Image Analyst 2014 年 5 月 13 日
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

回答 (1 件)

Image Analyst
Image Analyst 2014 年 5 月 13 日
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.

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by