Create Size 256 × 150 image that have 256 colors on it starting 0 till 255 (the first row is black, the last row is white, and in between all the gray shades).

1 visualizzazione (ultimi 30 giorni)
.Create Size 256 × 150 image that have 256 colors on it starting 0 till 255 (the first row is black, the last row is white, and in between all the gray shades).

Risposta accettata

DGM
DGM il 11 Mag 2022
Something like this:
A = uint8(repmat((0:255).',[1 150]));
imshow(A)
  3 Commenti
Abd a
Abd a il 11 Mag 2022
Thank you, but I put the question after I searched. I am still learning and I just wanted to create the image, but it appeared in one color, and this is not homework. <3
DGM
DGM il 12 Mag 2022
Modificato: DGM il 12 Mag 2022
It didn't really seem like an obvious homework assignment to me. Granted, it's often difficult to distinguish a slightly-abstracted statement of a beginner problem from a contrived homework problem.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by