필터 지우기
필터 지우기

Assign values to a matrix from a 2 dimensional array....

조회 수: 3 (최근 30일)
Piyum Rangana
Piyum Rangana 2017년 4월 2일
답변: dpb 2017년 4월 2일
Think I have a 2-dimensional array(Assume that x and y co-ordinations). And I want to assign '1' to all those co-ordinations given in the array(If the matrix values all are Zeros). How to do that Task ?

채택된 답변

dpb
dpb 2017년 4월 2일
a(a==0)=1; % done!
Look up "matrix addressing" in documentation

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by