insert circle values in 512x512 matrix

5 ビュー (過去 30 日間)
Douglas Janovik Maliszewski
Douglas Janovik Maliszewski 2019 年 11 月 24 日
編集済み: Walter Roberson 2019 年 11 月 24 日
I need create a 512x512 matrix, with the border parts geting the 0 value and the central part of matrix geting 1 value. The goal is create a mask of an image. How I solve this problem?

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 11 月 24 日
編集済み: Walter Roberson 2019 年 11 月 24 日
M = ones(512,512);
M([1 end], :) = 0;
M(:, [1 end]) = 0;

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by