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

  • Home
  • SEARCH
  • 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 3698392
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:58:33+00:00 2026-05-19T04:58:33+00:00

I have probability density function of skew normal distribution.I want to generate random number

  • 0

I have probability density function of skew normal distribution.I want to generate random number that follow the skew normal distribution in matlab.

  • 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-19T04:58:33+00:00Added an answer on May 19, 2026 at 4:58 am

    Can’t vouch for their performance/adequacy, but http://azzalini.stat.unipd.it/SN/ says the following, and has a link to a .zip file of MATLAB functions:

    The library has been ported to Matlab by Nicola Sartori. So far, this refers to update 0.21; hence facilities for the skew-t distribution are not included. A portion of the facilities for the skew-t distribution is however available via a set of Matlab functions which have been written and made available by Enrique Batiz (Enrique.Batiz [at] postgrad.mbs.ac.uk)

    Also see this code which is in visual Basic, but should be easily portable. Relevant excerpt shown below. This uses RandNorm (also in the linked webpage) which is a pair of numbers from a unit normal distribution, and in MATLAB you should be able to use randn(2,1).

    Function RandSkew(fAlpha As Single, _
                      Optional fLocation As Single = 0, _
                      Optional fScale As Single = 1, _
                      Optional bVolatile As Boolean = False) As Single
    
        ' shg 2008-0919
        ' http://azzalini.stat.unipd.it/SN/faq.html
    
        ' Returns a random variable with skewed distribution
        '       fAlpha      = skew
        '       fLocation   = location
        '       fScale > 0  = scale
    
        Dim sigma   As Single
        Dim afRN()  As Single
        Dim u0      As Single
        Dim v       As Single
        Dim u1      As Single
    
        If bVolatile Then Application.Volatile
        Randomize (Timer)
    
        sigma = fAlpha / Sqr(1 + fAlpha ^ 2)
    
        afRN = RandNorm()
        u0 = afRN(1)
        v = afRN(2)
        u1 = sigma * u0 + Sqr(1 - sigma ^ 2) * v
    
        RandSkew = IIf(u0 >= 0, u1, -u1) * fScale + fLocation
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a probability calculation. I have a query to calculate the total number
I have to generate about a million random trips between about 40K destinations. Each
Have you determined a maximum number of characters allowed in FCKEditor ? I seem
I have a program meant to simulate some probability problem (A variation of the
I have written a code in Python to create a transition probability matrix from
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a

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.