how to initialize population as matrix
Ältere Kommentare anzeigen
In image i treated pixels as population..how can i initialize image pixels as population in matrix..
1 Kommentar
Kalpana Dalwai
am 1 Jul. 2017
Antworten (1)
Image Analyst
am 19 Jun. 2017
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.
Kategorien
Mehr zu Image Category Classification finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!