Make the x and y coordinates then enter the value into those coordinates

1 回表示 (過去 30 日間)
Muhamad Arung
Muhamad Arung 2022 年 7 月 3 日
コメント済み: Jan 2022 年 7 月 3 日
I have:
value (a) matrix (20 rows x30 columns)
value (b) matrix (30 rows x 1 column)
value X = 20
value y = 30
I want to make the x (horizontal) and y (vertical) coordinates according to the x and y values (20 rows and 30 columns), then I will enter the (a) matrix values (20 rows x 30 columns) into the x and y coordinates
For example, the coordinates are 3 rows x 2 columns and then the value (a) of the matrix will be entered according to the coordinates, 3 rows x 2 columns.
  3 件のコメント
Muhamad Arung
Muhamad Arung 2022 年 7 月 3 日
Okay sir, so what I did first I had to make the x and y coordinates with a value of 20 rows x 30 columns, then when the coordinates were ready it would randomize the numbers from the x and y coordinate matrices for example 2x3 and I would enter the value from the value a matrix (20 rows x 30 columns), according to the random number. the image below is an example of a matrix a (20 rows x 30 columns)
Jan
Jan 2022 年 7 月 3 日
"I had to make the x and y coordinates with a value of 20 rows x 30 columns" - is this solved or part of the question? I'm not sure, what this means. Maybe:
x = 1:20;
y = 1:30;
% Or perhaps:
[X, Y] = mesgrid(x, y);
I cannot guess, what this means: "it would randomize the numbers from the x and y coordinate matrices for example 2x3".
What does the screenshot explain?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeParticle Swarm についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by