How to Change Array Values with some Random numbers

조회 수: 3 (최근 30일)
sami ullah
sami ullah 2021년 3월 2일
댓글: sami ullah 2021년 3월 2일
I have an array of size (1x12) consisting of following values: K=12 34 56 57 3 5 77 88 65 12 33 44
I have to change each value of K with some random numbers. How it can be done.

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2021년 3월 2일
K=randi([min_value max_value],1,12)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by