copy element of matrix to matrix
Show older comments
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
KALYAN ACHARJYA
on 25 Mar 2018
Clarify your question in more detail.
suraj singh
on 25 Mar 2018
Answers (2)
Birdman
on 25 Mar 2018
Isn't it simply
y=x
?
KALYAN ACHARJYA
on 25 Mar 2018
%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
Paulo Fonteles
on 5 Jul 2022
that would link matrix A and B... so every change in B would affect A
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!