copy element of matrix to matrix

2 次查看(过去 30 天)
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

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by