error in decryption code saying not enough input arguments
Afficher commentaires plus anciens
the code is for decrypting a text from an encrypted image .
clc;
close all;
clear all;
img=imread('enc2.gif');
imshow('enc2.gif');
img1=imread('C:\Users\Anushree Bhatt\Desktop\cd1\Major\desert1.jpg');
img1=img1(:,:,3);
[p,q,r]=size(img);
for i=1:q
disp(img(1,1));
disp(img1(1,1));
disp(img(1,i)-img1(1,i));
if (img(1,i)-img1(1,i)==0)
break;
end
text(i)=(img(1,i)-img1(1,i)+96);
end
len=size(text);
k=len(1,2);
text1=zeros(1,k);
for i=1:k
m=text(i)
for j=1:7
if (j-1)>0
a(j-1)=rem(m,2);
else
a(7)=rem(m,2);
end
m=floor(m/2);
disp(m);
if m==1
a(m)=1;
break;
end
end
for j=0:6
text1(i)=text1(i)+a(j+1)*(2^j);
end
end
text1=char(text1);
disp (text1);
X=('The encrypted text is');
disp(X);
disp(text1);
the error is at m=text(i) saying not enough input arguments.i shall post the code for encryption if required.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Entering Commands dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!