Probability, Statistics, and Applications in BME

1 回表示 (過去 30 日間)
Zainab Alabdulali
Zainab Alabdulali 2020 年 2 月 3 日
回答済み: Bhaskar R 2020 年 2 月 3 日
Write a MATLAB program to simulate the selection of two 20-item lists from a 500item sample.

回答 (1 件)

Bhaskar R
Bhaskar R 2020 年 2 月 3 日
data_500 = rand(1, 500); % 500 random values
values_40 = randperm(500, 40); % 40 random values(2*20 items)
first_20list = data_500(values_40(1:20)); % selection first 20 items list from 500 samples
second_20list = data_500(values_40(21:end));% selection second 20 items list from 500 samples

カテゴリ

Help Center および File ExchangeElementary Math についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by