필터 지우기
필터 지우기

create nononteger random matrix in certain range

조회 수: 2 (최근 30일)
David Kenkadze
David Kenkadze 2021년 10월 19일
댓글: David Kenkadze 2021년 10월 20일
Ihave to create 5X5 random noninteger matrix in the range of -100:100. I create it, but there are all integer numbers.
I need something like this
-99.8 4.5 2.2 5.7 67.6
-67.8 -20.4 e.t.c
  댓글 수: 2
Steven Lord
Steven Lord 2021년 10월 19일
From which distribution do you want to draw these numbers? Uniform, truncated normal, or some other distribution?
All the numbers in your example have one decimal place. Is that a requirement or would something like 1.23456789 be acceptable?
David Kenkadze
David Kenkadze 2021년 10월 20일
yes. values must not be integers

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2021년 10월 19일
200*rand(5)-100
  댓글 수: 1
David Kenkadze
David Kenkadze 2021년 10월 20일
Tnx. It works, but it has strange form of writing.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by