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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:46:11+00:00 2026-05-10T18:46:11+00:00

I have to generate two random sets of matrices Each containing 3 digit numbers

  • 0

I have to generate two random sets of matrices Each containing 3 digit numbers ranging from 2 – 10

like that

matrix 1: 994,878,129,121

matrix 2: 272,794,378,212

the numbers in both matrices have to be greater then 100 and less then 999

BUT

the mean for both matrices has to be in the ratio of 1:2 or 2:3 what ever constraint the user inputs

my math skills are kind of limited so any ideas how do i make this happen?

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-10T18:46:11+00:00Added an answer on May 10, 2026 at 6:46 pm

    In order to do this, you have to know how many numbers are in each list. I’m assuming from your example that there are four numbers in each.

    1. Fill the first list with four random numbers.
    2. Calculate the mean of the first list.
    3. Multiply the mean by 2 or by 3/2, whichever the user input. This is the required mean of the second list.
    4. Multiply by 4. This is the required total of the second list.
    5. Generate 3 random numbers.
    6. Subtract the total of the three numbers in step 5 from the total in step 4. This is the fourth number for the second list.
    7. If the number in step 6 is not in the correct range, start over from step 5.

    Note that the last number in the second list is not truly random, since it’s based on the other values in the list.

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

Sidebar

Related Questions

I have the following code to generate two random numbers var attackRoll = Math.floor((Math.random()*6)+1);
experts I wish to generate unique random numbers between two numbers (from text box
I have stored two variables that generate simulate two random die rolls. I'm trying
I have the following code which will generate two pdf files containing plots to
I have a script that generates two lines as output each time. I'm really
I have a program that generates/'rolls' two dice. I would like to output these
I have two ViewControllers: The RedButtonViewController and the TweetViewController. The RedButtonViewController generates random numbers
I have looked at how to generate two random ints with rand()%n (where n
I have two scripts which both generate random forests in R , which as
I have an interval consisting of two float numbers, and need to generate 20

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.