Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1046195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:06:27+00:00 2026-05-16T16:06:27+00:00

I am using a book with a function I would like to use. However

  • 0

I am using a book with a function I would like to use. However I don’t think I am getting the correct values from my function.

Here is the instruction from the book:

alt text

Here is the function as I have created it in MATLAB:

function [ shortProbability ] = pShort( zkt, zktStar, short)

if zkt > zktStar
    shortProbability = 0;
else
    normalizer = 1/(1-exp(-short*zktStar));
    shortProbability = normalizer * (short * exp(-short*zkt));
end

end

The values I am plugging in are:

zkt = 0:1:100
zktStar = 50;
short = 0.01;

However my graph doesn’t behave like the one which I am supposed to end up with, which is this:

alt text

I am getting this from the graph, which looks correct, however I don’t think it is being normalized properly:

alt text

Can anyone help me to correct this function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:06:28+00:00Added an answer on May 16, 2026 at 4:06 pm

    This is the exponential distribution. You can use EXPPDF and EXPCDF from the Statistics Toolbox:

    normalizer = 1 ./ ( expcdf(zktStar,1/short) - expcdf(0,1/short) );
    shortProbability = exppdf(zkt, 1/short) * normalizer;
    

    and it should be equivalent to what you have…


    This is what I get when I combine it with the graph from your previous question:

    alt text

    To confirm, we compute the area under each of the curves (close enough to 1):

    >> trapz(zkt,hitProbabilty)
    ans =
         1
    
    >> trapz(zkt,shortProbability)
    ans =
           1.0077
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to use the function glMultiDrawElements while studying OpenGL (using red book)
From the book Groovy and Grails recipes I'm using the following code snippet: String
Im am using a pattern from the book Learning Cocos2D. I have a GameState
I have several million records in a table (book/media data) and I would like
I would like to implement a type-parametrized function as per excersize on page 72
I got this html code from a book that i'm using to learn jquery
I am writing an interactive book and would like events to be fired by
I'm using Google Book Search API to add missings bits and pieces to my
I'm a newb to RoR. I'm using the book Agile Web Development with Rails
I am learning OpenCV using Learning OpenCV book. One problem I am facing while

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.