Random Number Generation with Parameters (2024)

32 views (last 30 days)

Show older comments

Demosthenis Kasastogiannis about 5 hours ago

  • Link

    Direct link to this question

    https://www.mathworks.com/matlabcentral/answers/2145924-random-number-generation-with-parameters

  • Link

    Direct link to this question

    https://www.mathworks.com/matlabcentral/answers/2145924-random-number-generation-with-parameters

Edited: Demosthenis Kasastogiannis about 2 hours ago

Dear All,

Kindly ask for your assistant, I am trying to generate a time series with approx 500 data with the following parameters

1)values between min=0 max=1500

2) 0-100 range 50% of total data, 101-200 25% of total data etc

3) x/x+1 data should be +/-10% at 20% of data, x/x+1 should be between +/-10% - +/-20 at 15% of total data etc

Any ideas will be highly appreciated

2 Comments

Show NoneHide None

Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/2145924-random-number-generation-with-parameters#comment_3239244

  • Link

    Direct link to this comment

    https://www.mathworks.com/matlabcentral/answers/2145924-random-number-generation-with-parameters#comment_3239244

Edited: John D'Errico 8 minutes ago

What does this mean:

3) x/x+1 data should be +/-10% at 20% of data, x/x+1 should be between +/-10% - +/-20 at 15% of total data etc

does it say something about the ratio of consecutive terms? And what exactly does it say? I'm sorry, but that line is highly confusing.

Demosthenis Kasastogiannis about 1 hour ago

Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/2145924-random-number-generation-with-parameters#comment_3239294

  • Link

    Direct link to this comment

    https://www.mathworks.com/matlabcentral/answers/2145924-random-number-generation-with-parameters#comment_3239294

Edited: Demosthenis Kasastogiannis about 1 hour ago

Apologies for the poor description...

Concerning the third parameter let me provide an example.

100,120,135..... the percentage difference if 100 and 120 is 20% (100x 1,2) while the percentage difference of 120 and 135 is 12,5%. As such i would like to determine the number of % differences within the generated data series as let's say 0%-10% differences at 20% of the entire data (is 500*20% = 100 data), 10%-20% difference at 15% of the entire data (500*15% = 75 data) etc. Hope it is more clear now. As i do want to generate consecutive data with 50% and 60% differences, it will be usefull if the generated data of ranges (0-100, 101 -200, 201-300 etc) are not continuously ie 100,275,510 etc

Many thanks!!!

Sign in to comment.

Sign in to answer this question.

Answers (1)

Amith 32 minutes ago

  • Link

    Direct link to this answer

    https://www.mathworks.com/matlabcentral/answers/2145924-random-number-generation-with-parameters#answer_1500079

  • Link

    Direct link to this answer

    https://www.mathworks.com/matlabcentral/answers/2145924-random-number-generation-with-parameters#answer_1500079

Open in MATLAB Online

Hi Demosthenis,

I understand that you want to generate random numbers based on a few rules/parameters.

The first and second conditions can be met using the `randi` function. For instance, you can generate 50% of the total data size (i.e., 500 numbers) within the range of 0-100. The next 20% of the data can be in the range of 101-200, while the remaining numbers can fall within the range of 201-1500. For example, to generate the first 100 numbers in the range of 0-100, you can use:

r = randi([0 100],1,100)

However, the third condition is unclear and somewhat confusing. It would be helpful if you could provide more details or elaborate further on it.

Hope this helps!

1 Comment

Show -1 older commentsHide -1 older comments

Demosthenis Kasastogiannis about 1 hour ago

Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/2145924-random-number-generation-with-parameters#comment_3239289

  • Link

    Direct link to this comment

    https://www.mathworks.com/matlabcentral/answers/2145924-random-number-generation-with-parameters#comment_3239289

Edited: Demosthenis Kasastogiannis about 1 hour ago

Thank you very much Amith!! It is Highly appreciated

Concerning the third parameter let me provide an example.

100,120,135..... the percentage difference if 100 and 120 is 20% (100x 1,2) while the percentage difference of 120 and 135 is 12,5%. As such i would like to determine the number of % differences within the generated data series as let's say 0%-10% differences at 20% of the entire data (is 500*20% = 100 data), 10%-20% difference at 15% of the entire data (500*15% = 75 data) etc. Hope it is more clear now. As i do want to generate consecutive data with 50% and 60% differences, it will be usefull if the generated data of ranges (0-100, 101 -200, 201-300 etc) are not continuously ie 100,275,510 etc

Many thanks!!!

Sign in to comment.

Sign in to answer this question.

See Also

Tags

  • random number generator
  • discrete distribution

Community Treasure Hunt

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

Start Hunting!

An Error Occurred

Unable to complete the action because of changes made to the page. Reload the page to see its updated state.


Random Number Generation with Parameters (6)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

Random Number Generation with Parameters (2024)

References

Top Articles
Taco (musician) FAQs 2024- Facts, Rumors and the latest Gossip.
The most Midwestern things Minnesota Gov. Tim Walz has ever done
Winston Salem Nc Craigslist
Beacon Schnider
New Slayer Boss - The Araxyte
Www.metaquest/Device Code
Chelsea player who left on a free is now worth more than Palmer & Caicedo
Find All Subdomains
Teamexpress Login
Hello Alice Business Credit Card Limit Hard Pull
A.e.a.o.n.m.s
Maxpreps Field Hockey
Unit 1 Lesson 5 Practice Problems Answer Key
Power Outage Map Albany Ny
Pvschools Infinite Campus
Discover Westchester's Top Towns — And What Makes Them So Unique
Darksteel Plate Deepwoken
Shreveport Active 911
How Much Are Tb Tests At Cvs
Letter F Logos - 178+ Best Letter F Logo Ideas. Free Letter F Logo Maker. | 99designs
Red Devil 9664D Snowblower Manual
White Pages Corpus Christi
O'Reilly Auto Parts - Mathis, TX - Nextdoor
The BEST Soft and Chewy Sugar Cookie Recipe
Shreveport City Warrants Lookup
Imouto Wa Gal Kawaii - Episode 2
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Bj타리
Danielle Moodie-Mills Net Worth
Delete Verizon Cloud
R/Mp5
Robert A McDougal: XPP Tutorial
Little Caesars Saul Kleinfeld
UPS Drop Off Location Finder
Sitting Human Silhouette Demonologist
Morlan Chevrolet Sikeston
How does paysafecard work? The only guide you need
Consume Oakbrook Terrace Menu
W B Crumel Funeral Home Obituaries
How Much Is Mink V3
Search All of Craigslist: A Comprehensive Guide - First Republic Craigslist
Shane Gillis’s Fall and Rise
Aita For Announcing My Pregnancy At My Sil Wedding
The Listings Project New York
Electric Toothbrush Feature Crossword
Cult Collectibles - True Crime, Cults, and Murderabilia
Rovert Wrestling
Bbwcumdreams
Diamond Desires Nyc
M Life Insider
Basic requirements | UC Admissions
Heisenberg Breaking Bad Wiki
Latest Posts
Article information

Author: Melvina Ondricka

Last Updated:

Views: 6015

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Melvina Ondricka

Birthday: 2000-12-23

Address: Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498

Phone: +636383657021

Job: Dynamic Government Specialist

Hobby: Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball

Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.