作者在 2010-03-14 20:10:55 发布以下内容
clc;
clear all;
I1=fopen('english.txt','r');
I2=fread(I1,'char');
fclose(I1);
switch findstr(I2,'A''B''E''H''I''K''M''N''O''P''T''X''Z''o''p''x')
case 'A'
strrep(I2,'A','Α');
case 'B'
strrep(I2,'B','Β');
case 'Ε'
strrep(I2,'E','Ε');
case 'Η'
strrep(I2,'H','Η');
case 'Ι'
strrep(I2,'I','Ι');
case 'Κ'
strrep(I2,'K','Κ');
case 'Μ'
strrep(I2,'M','Μ');
case 'Ν'
strrep(I2,'N','Ν');
case 'Ο'
strrep(I2,'O','Ο');
case 'Ρ'
strrep(I2,'P','Ρ');
case 'Υ'
strrep(I2,'T','Υ');
case 'Χ'
strrep(I2,'X','Χ');
case 'Ζ'
strrep(I2,'Z','Ζ');
case 'ο'
strrep(I2,'o','ο');
case 'ρ'
strrep(I2,'p'ρ');
case 'χ'
strrep(I2,'x','χ');
break
fprintf(I2,'qianru.txt');
end
clear all;
I1=fopen('english.txt','r');
I2=fread(I1,'char');
fclose(I1);
switch findstr(I2,'A''B''E''H''I''K''M''N''O''P''T''X''Z''o''p''x')
case 'A'
strrep(I2,'A','Α');
case 'B'
strrep(I2,'B','Β');
case 'Ε'
strrep(I2,'E','Ε');
case 'Η'
strrep(I2,'H','Η');
case 'Ι'
strrep(I2,'I','Ι');
case 'Κ'
strrep(I2,'K','Κ');
case 'Μ'
strrep(I2,'M','Μ');
case 'Ν'
strrep(I2,'N','Ν');
case 'Ο'
strrep(I2,'O','Ο');
case 'Ρ'
strrep(I2,'P','Ρ');
case 'Υ'
strrep(I2,'T','Υ');
case 'Χ'
strrep(I2,'X','Χ');
case 'Ζ'
strrep(I2,'Z','Ζ');
case 'ο'
strrep(I2,'o','ο');
case 'ρ'
strrep(I2,'p'ρ');
case 'χ'
strrep(I2,'x','χ');
break
fprintf(I2,'qianru.txt');
end