copy element of matrix to matrix

2 ビュー (過去 30 日間)
suraj singh
suraj singh 2018 年 3 月 25 日
コメント済み: Paulo Fonteles 2022 年 7 月 5 日
I have a matrix x of 20x95 elements are in double. I want to copy element of x to y. Please provide code.
  2 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 3 月 25 日
Clarify your question in more detail.
suraj singh
suraj singh 2018 年 3 月 25 日
Sir, I want to copy all elements of one matrix to other matrix and number of rows and column are 20x95 in the input matrix. Output matrix should be 20x95.

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

回答 (2 件)

Birdman
Birdman 2018 年 3 月 25 日
Isn't it simply
y=x
?

KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 3 月 25 日
%Suppose A is your Input matrix, B is your output matrix
%if matrix is already generated within code, no need to input statement-next line
A=input('Enter The Matrix Elements');
B=A;
disp(B);
%Now Matrix B having same elements as Matrix A
  1 件のコメント
Paulo Fonteles
Paulo Fonteles 2022 年 7 月 5 日
that would link matrix A and B... so every change in B would affect A

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

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by