Creating a Matrix by Manipulation

Hi, How do you create a matrix that is identical to another matrix except for one entry? For example, if there is a matrix A=[1 2 ; 3 4], how do you create a matrix B=[1 10 ; 3 4]?
Thank you.

Antworten (1)

Joseph Cheng
Joseph Cheng am 6 Okt. 2015

1 Stimme

you would index the item like
A(1,2) = 10; %A(1,2) says row 1 column 2 of A should = 10

Diese Frage ist geschlossen.

Gefragt:

am 6 Okt. 2015

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by