Info

この質問は閉じられています。 編集または回答するには再度開いてください。

For the following formulas attached here I've tried the code given below. But the o/p is not proper. Please refer to the formulas in the attached file and modify the code.

1 回表示 (過去 30 日間)
PLACEIUS NISHIGA G
PLACEIUS NISHIGA G 2018 年 1 月 6 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
if true
img = imread('cameraman.tif');
c=img';
d=c(:); %1D matrix
[W,L]=size(img);
k=rand(192,1);
syms k1 t
for i=1:4
k1=k(((48*i)-47):(48*i),1);
a1 = symsum(k1*(2^(t-(48*i)+47)),t,((48*i)-47),(48*i));
a=a1/(2^48);
end
for x=1:2
r(x)=mod(prod(a*(2^48)+a(x)),0.4)+3.6;
C(x)=mod(prod(a*(2^48)+a(x+2)),1);
end
C1=C(1);
C2=C(2);
for y=1:[W,L]
if y==1
C(y)=C(x);
else
if y~=1&&C(y-1)<0.5
C(y)=0.5*(r(x)*C(y-1));
else
if y~=1&&C(y-1)>=0.5
C(y)=0.5*(r(x)*(1-(C(y-1))));
end
end
end
end
for y=1:[W,L]
if y==1
E1(y)=d(y);
else
E1(y)=mod(d(y)+floor(C(y)*(10^13))+d(y-1),256);
end
end
for y=1:[W,L]
if y==[W,L]
E2(y)=E1(y);
else
E2(y)=mod(E1(y)+floor(C(y)*(10^13))+E1(y+1),256);
end
end
Q=sum(E2);
%Q=dec2bin(Q);
Q=numel(dec2bin(Q));
end

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by