代码拉取完成,页面将自动刷新
function [ row, col] = randinterval( matrix, count, key)
[ m, n] = size( matrix) ;
interval1 = floor( m* n /count) + 1;
interval2 = interval1 - 2;
if interval2 == 0 error( '载体太小不能将秘密信息隐藏进去! ') ;
end
rand('seed' , key) ;
a = rand( 1, count) ;
row = zeros( [ 1 count] ) ;
col = zeros( [ 1 count] ) ;
r = 1;
c =1;
row( 1, 1) = r;
col( 1, 1) = c;
for i = 2:count
if a( i) >=0.5
c = c + interval1;
else
c = c + interval2;
end
if c > n
r = r +1;
if r > m
error( '载体太小不能将秘密信息隐藏进去! ') ;
end
c = mod( c, n);
if c ==0
c = 1;
end
end
row( 1, i) = r;
col( 1, i) = c;
end
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。