matlab create image
% Reads image
im = imread('image.jpg');
% Displays image
image(invert)
4.33
3
% Define A as your size matrix, this example uses 200x200 of 0's
A = uint8(zeros(200,200));
% loop over M x N with two for's
for row 1:size(A,1)
for col 1:size(A,2)
% your logic here, example:
A(row,col) = 255
end
end
% image matrix is now 200x200 of 255, using imshow will display a white image.
% imshow(A)
Thank you!
3
0
Are there any code examples left?
New code examples in category Matlab
-
Matlab 2022-03-12 20:25:01 switch matlab
-
Matlab 2022-02-28 23:10:26 scilab trace function
-
Matlab 2022-02-22 08:40:07 matlab tilde
-
Matlab 2022-02-09 18:00:07 matlab preallocate array size
-
Matlab 2022-02-09 17:50:01 plot in log scale matlab
-
Matlab 2022-02-03 10:21:25 zsh corrupt history file
-
Matlab 2022-02-02 23:16:39 octave wait
-
Matlab 2022-02-02 19:17:12 matlab app designer numeric edit field properties
-
Matlab 2022-02-02 17:36:14 matlab zero vector
-
Matlab 2022-02-02 15:45:30 diff(x) matrix matlab