필터 지우기
필터 지우기

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 CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by