• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

matlab制造一个64*64的仿真数据

原作者: [db:作者] 来自: [db:来源] 收藏 邀请
fid = fopen('test_001.img','w');
r=random('Normal',100,0,64,64);
z=random('Uniform',0,5,64,64);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a=14;
b=16;
for i=15:18
    for j=a:b
        r(i,j)=random('Normal',102,0,1,1);
    end
    a = a-1;
    b = b+1;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=15:18
    for j=31:34
        r(i,j)=random('Normal',102,0,1,1);
    end
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=14:19
    for j=47:48
         r(i,j)=random('Normal',102,0,1,1);
    end
end

for i=16:17
    for j=45:50
        r(i,j)=random('Normal',102,0,1,1);
    end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

a=13;
b=17;
for i=30:35
    for j=a:b
       r(i,j)=random('Normal',102,0,1,1); 
    end
    
    a=a-1;
    b=b+1;
    
end 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=30:35
    for j=30:35
        r(i,j)=random('Normal',102,0,1,1); 
    end    
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i =29:35
    for j=47:49
         r(i,j)=random('Normal',102,0,1,1);
    end 
end 

for i=31:33
    for j=45:51
        r(i,j)=random('Normal',102,0,1,1);
    end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

a=13;
b=18;
for i=46:53
    for j=a:b
        r(i,j)=random('Normal',102,0,1,1);
    end
    a=a-1;
    b=b+1;
end 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=45:53
    for j=29:37
        r(i,j)=random('Normal',102,0,1,1);
    end
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=44:53
    for j=46:49
        r(i,j)=random('Normal',102,0,1,1);
    end
end 

for i=47:50
   for j=43:52
        r(i,j)=random('Normal',102,0,1,1);
   end
end 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
r=r+z;count =fwrite(fid,r);
fclose('all');




fid = fopen('test_002.img','w');
s=random('Normal',100,0,64,64);z=random('Uniform',0,5,64,64);
for i=8:12
for j=8:12
s(i,j)=random('Normal',102,0,1,1);
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
s=s+z;count=fwrite(fid,s);
fclose('all');

  


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
DelphiXE2之FireMonkey入门(41)-控件基础:TListBox发布时间:2022-07-18
下一篇:
matlab学习笔记第三章——绘图与图形发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap