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

28 次查看(过去 30 天)
i want to change the value in some specific rows how can i do it?

回答(2 个)

C.J. Harris
C.J. Harris 2014-12-4
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

Abed
Abed 2014-12-5
name of matrix(row, column) = replacement value

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by