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 Ansicht (letzte 30 Tage)
.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).

Akzeptierte Antwort

DGM
DGM am 11 Mai 2022
Something like this:
A = uint8(repmat((0:255).',[1 150]));
imshow(A)
  3 Kommentare
Abd a
Abd a am 11 Mai 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 am 12 Mai 2022
Bearbeitet: DGM am 12 Mai 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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by