Use of for loop and vectorization for creating an array

1 Ansicht (letzte 30 Tage)
Somesh Singh
Somesh Singh am 5 Jul. 2011
Hi!
I am wanting to declare a 2-D matrix of type uint8 and order 240x320 and fill non-zero data in it. How can I do this using a for loop and/or while loop and vectorization. Please help.
Thanks

Akzeptierte Antwort

Oleg Komarov
Oleg Komarov am 5 Jul. 2011
randi(240,320,'uint8')

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Compiler SDK finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by