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 Center および File ExchangeMultidimensional Arrays についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by