Using normrnd for generating natural values (without decimal values)

1 ビュー (過去 30 日間)
Sahar khalili
Sahar khalili 2022 年 6 月 14 日
編集済み: Walter Roberson 2022 年 6 月 15 日
I would like to generate data with average of 27 and standard deviation of 1.41, but I would like the data have no decimal values, ex to be like this 12, 24, 27 ... . Could you please help me how I can do so?
  4 件のコメント
Sahar khalili
Sahar khalili 2022 年 6 月 14 日
As I mentioned I do not care about the distributation of data, I need 6 numbers that just have the mean of 27 and std deviation of 1.41, and what matters for me is just data has no decimal values.

サインインしてコメントする。

回答 (1 件)

Sam Chak
Sam Chak 2022 年 6 月 14 日
編集済み: Sam Chak 2022 年 6 月 14 日
How about this data set {25, 26, 27, 27, 28, 29}?
A = [25, 26, 27, 27, 28, 29]
A = 1×6
25 26 27 27 28 29
M = mean(A)
M = 27
S = std(A)
S = 1.4142
  5 件のコメント
Sam Chak
Sam Chak 2022 年 6 月 15 日
Many thanks to @Walter Roberson for explaning and showing the Permutation search procedure. The permutation-based method is effective.

サインインしてコメントする。

カテゴリ

Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by