Replace A single element of matrix

조회 수: 47 (최근 30일)
Odom Seng
Odom Seng 2016년 6월 28일
댓글: Odom Seng 2016년 6월 28일
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!

채택된 답변

dpb
dpb 2016년 6월 28일
  댓글 수: 3
James Tursa
James Tursa 2016년 6월 28일
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 2016년 6월 28일
Well that's embarrassing! Thanks for the quick replies, much appreciated.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by