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

2 ビュー (過去 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 Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by