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 view (last 30 days)
Show older comments
.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).
Accepted Answer
DGM
on 11 May 2022
Something like this:
A = uint8(repmat((0:255).',[1 150]));
imshow(A)
3 Comments
DGM
on 12 May 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.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!