image processing, data stimulation

3 次查看(过去 30 天)
hi, i want to generation an matrix that simulate an image of size 198*211*3 so i used this code:
clc
close all
clear all
for i=1:4;
for j=1:4;
x(i,j)=rand*100;
if x(i,j)>=0 && x(i,j)<=255;
x
end
end
end
is this work correct? thank you

采纳的回答

Walter Roberson
Walter Roberson 2018-3-19
x = randi([0 255], 198, 211, 3, 'uint8');
  1 个评论
mohammed abdul wadood
in facet i used this solution like this:
x=randi([0 255],198,211)
but I thought it's wrong; but now you Improve it in your solution, thank you sir, thank you so much.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by