copy element of matrix to matrix

2 Ansichten (letzte 30 Tage)
suraj singh
suraj singh am 25 Mär. 2018
Kommentiert: Paulo Fonteles am 5 Jul. 2022
I have a matrix x of 20x95 elements are in double. I want to copy element of x to y. Please provide code.
  2 Kommentare
KALYAN ACHARJYA
KALYAN ACHARJYA am 25 Mär. 2018
Clarify your question in more detail.
suraj singh
suraj singh am 25 Mär. 2018
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.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Birdman
Birdman am 25 Mär. 2018
Isn't it simply
y=x
?

KALYAN ACHARJYA
KALYAN ACHARJYA am 25 Mär. 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 Kommentar
Paulo Fonteles
Paulo Fonteles am 5 Jul. 2022
that would link matrix A and B... so every change in B would affect A

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by