how to initialize population as matrix

2 ビュー (過去 30 日間)
Kalpana  Dalwai
Kalpana Dalwai 2017 年 6 月 14 日
コメント済み: Kalpana Dalwai 2017 年 7 月 1 日
In image i treated pixels as population..how can i initialize image pixels as population in matrix..
  1 件のコメント
Kalpana  Dalwai
Kalpana Dalwai 2017 年 7 月 1 日
thank you sir

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2017 年 6 月 19 日
Use ones(). For example to set up a matrix where every value is 10, do this
populationImage = 10 * ones(rows, columns);
If you want random values instead, use
populationImage = 10 * rand(rows, columns); % Range = 0 to 10.

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by