Replace A single element of matrix

41 vues (au cours des 30 derniers jours)
Odom Seng
Odom Seng le 28 Juin 2016
Commenté : Odom Seng le 28 Juin 2016
Hi, what I want to do is replace a single value in the 201X201 identity matrix to form a transformation matrix. I know how to form the identity matrix, but im having trouble figuring out how to replace a value. I want to replace the zero in the 201st row and 1st column with a 240. I know this probably has a an easy solution, but any help is appreciated, thanks!

Réponse acceptée

dpb
dpb le 28 Juin 2016
  3 commentaires
James Tursa
James Tursa le 28 Juin 2016
dpb's post assumed you had already formed the identity matrix. If not, then create it first. E.g.,
x = eye(201);
x(201,1) = 240;
Odom Seng
Odom Seng le 28 Juin 2016
Well that's embarrassing! Thanks for the quick replies, much appreciated.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Numeric Types dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by