How can I add 1 to a particular element in a matrix?

36 views (last 30 days)
Suppose I have a matrix of dimension 13*13 and I would like to add 1 to element of first row -second column , how can I add 1 to that element?

Accepted Answer

James Tursa
James Tursa on 13 Feb 2020
M = your 13x13 matrix
M(1,2) = M(1,2) + 1;
  1 Comment
sreesoumya cheppalli
sreesoumya cheppalli on 16 Feb 2020
Thank you so much for answering my question. Its was really helpful. I could use the same command with change in sign for subtraction operation.

Sign in to comment.

More Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!