prompt={'请输入初始密钥','请设置水印路径'};
def={'10000','e:\image\watermark.bmp'};
dlgTitle='生成水印';
lineNo=1;
Ans=inputdlg(prompt,dlgTitle,lineNo,def);
% s=['0.',Ans];
% %将得到的结果处理为小于1.
% Ans=str2num(cell2mat(s));
original=['0.',Ans{1}];
file=Ans{2};
original=str2num(original);
%需要转换成数值型,不能直接用str2num
===================================
prompt={'左上角X','左上角Y','右上角X','右上角Y'};
title='请输入要截取的坐标点值';
lines=1;
def={'0','0','200','200'};
% answer=inputdlg(prompt,title,lines,def);
mya=inputdlg(prompt,title,lines,def,'on');
% key1=str2num(mya(1));
% key2=str2num(mya(2));
% key3=str2num(mya(3));
% key4=str2num(mya(4));
% key11=cell2mat(mya(1));
% key1=key11(1);
% key21=cell2mat(mya(2));
% key2=key21(1);
% key31=cell2mat(mya(3));
% key3=key31(1);
% key41=cell2mat(mya(4));
% key4=cell2mat(key41);
% key1=0;
% key2=0;
% key3=200;
% key4=200;
key11=[mya{1}];
key22=[mya{2}];
key33=[mya{3}];
key44=[mya{4}];
%
key1=str2num(key11);
key2=str2num(key22);
key3=str2num(key33);
key4=str2num(key44);