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 8099085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:17:15+00:00 2026-06-05T22:17:15+00:00

I have got a matrix which gives me a 2-dimensional discrete distribution (N²->R) in

  • 0

I have got a matrix which gives me a 2-dimensional discrete distribution (N²->R) in Matlab.

Are there built-in functions in Matlab (R2011b, with the statistic toolbox) giving the central moments and the mean? If they exist for functions of (R²->R) it is fine too. Otherwise I will have to build them myself, but I don’t want to reinvent the wheel.

Thank you

  • 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-06-05T22:17:17+00:00Added an answer on June 5, 2026 at 10:17 pm

    A quick look and I couldn’t turn up any functions, though this isn’t a fact by any means.

    However, working it out from scratch, and assuming you mean a matrix such as:

        % x=1  x=2  x=3
    P = [ 0.1  0.2  0.1        % y = 1  
          0.1  0.1  0.2        % y = 2
          0.0  0.0  0.2 ]      % y = 3
    

    And you mean that this describes the joint discrete distribution (joint probability mass function). That is, the entry at (X,Y) contains the probability of (X,Y) occurring.

    I’m also assuming by your use of N in mathematical notation means the natural numbers. If so, then you can use the following code.

    Mean:

     meanX = sum(P,1) * (1:size(P,2))'; 
     meanY = sum(P,2)' * (1:size(P,1))';
    

    For the central moment K,L (K correspnding to X and L corresponding to Y):

     [X,Y] = meshgrid(1:size(P,2),1:size(P,1));
     integrandXY_KL = (X - meanX).^K .* (Y-meanY).^L .* P;
     momentXY_KL = sum(integrandXY_KL(:));
    

    And you can generalize it further if the values of X are arbitrary (and not just natural numbers) as follows. If Xvals = [ 1 2 4 ] and Yvals = [ 4 5 6 ]. All of the above still works, you just replace all occurences of 1:size(P,2) with Xvals and all occurences of 1:size(P,1) with Yvals.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have got an NSString *str = @12345.6789 and want to find out if there
I have got a form into which information is entered, and a drop down
I have got a table [newsletter] in the db, which saves the email address,
I have got a few tables which I am trying to join. I just
I've got 2 different files, one of them is an input matrix (X) which
I have a piece of code which performs calculations on a matrix by iterating
I have a 10GB CSV file which is essentially a huge square matrix. I
I have calibrated stereo cameras and got the extrinsic matrix. I know the Translation
I have got the requirement to find the core file in multiple box/machine and
I have got this code: function init(){ if (typeof window.jQuery !== 'function') { var

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.