copy element of matrix to matrix

I have a matrix x of 20x95 elements are in double. I want to copy element of x to y. Please provide code.

2 Comments

Clarify your question in more detail.
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.

Sign in to comment.

Answers (2)

%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 Comment

that would link matrix A and B... so every change in B would affect A

Sign in to comment.

Categories

Asked:

on 25 Mar 2018

Commented:

on 5 Jul 2022

Community Treasure Hunt

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

Start Hunting!