i want to change the value in some specific rows how can i do it

Answers (2)

A = [1 2 3; 1 2 3; 1 2 3; 1 2 3; 1 2 3; 1 2 3]
% Change Row 2
A(2,:) = [9 8 7];
% Change Row 5
A(5,:) = [5 5 5];
A =
1 2 3
9 8 7
1 2 3
1 2 3
5 5 5
1 2 3
name of matrix(row, column) = replacement value

Tags

Asked:

on 4 Dec 2014

Answered:

on 5 Dec 2014

Community Treasure Hunt

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

Start Hunting!