%t=0:0.000025:0.02;
t1=0:1:800;
m=0.8;
A=400;
x=sin(100*pi*(t1/40000));
y=m*A*x+A;
%x1=m*A*x;
%plot(t1,x1);
%hold on;
plot(t1,y);
hold on;
y1=roundn(y,0);
%y2=A*x+A;
x1=sin(100*pi*(t1/40000)+pi);
Z=m*A*x1+A;
Z1=roundn(Z,0);
plot(t1,Z);
a=[t1;y1];
b=[t1;Z1];
fid=fopen('PA-rom.mif','w');
fprintf(fid,'%d:%d;n',a);
fid=fopen('NA-rom.mif','w');
fprintf(fid,'%d:%d;n',b);
fclose(fid);
%t=0:0.000025:0.02;
t1=0:1:800;
m=0.8;
A=400;
x=sin(100*pi*(t1/40000));
y=m*A*x+A;
%x1=m*A*x;
%plot(t1,x1);
%hold on;
plot(t1,y);
hold on;
y1=roundn(y,0);
%y2=A*x+A;
x1=sin(100*pi*(t1/40000)+pi);
Z=m*A*x1+A;
Z1=roundn(Z,0);
plot(t1,Z);
a=[t1;y1];
b=[t1;Z1];
fid=fopen('PA-rom.mif','w');
fprintf(fid,'%d:%d;n',a);
fid=fopen('NA-rom.mif','w');
fprintf(fid,'%d:%d;n',b);
fclose(fid);
举报