clc;
% clear all;
Dane = importdata('GAE_S02_PAM.mat');
Ua=Dane;
Num=[-9.71409323488429e-05 -8.07452320330076e-05 -0.000112686510060271 -0.000151516770302790 -0.000197830221279244 -0.000252110168682686 -0.000314661819136746 -0.000385685714917851 -0.000465250710479947 -0.000553072375674049 -0.000648642391154511 -0.000751403500145107 -0.000860172219979632 -0.000973821570661108 -0.00109065219696278 -0.00120880306967688 -0.00132609119057247 -0.00144006351645474 -0.00154801344160982 -0.00164705119499090 -0.00173408181065602 -0.00180589925759426 -0.00185928906733429 -0.00189097766637378 -0.00189788127172278 -0.00187701749208392 -0.00182570593193012 -0.00174159750910226 -0.00162278241215030 -0.00146786697682690 -0.00127608195492862 -0.00104732198481596 -0.000782233321702366 -0.000482274164853227 -0.000149707455755329 0.000212299935351519 0.000599741347354387 0.00100772453164355 0.00143053208388114 0.00186166324289692 0.00229392012417828 0.00271948730281080 0.00313007140413667 0.00351701818746309 0.00387146535017828 0.00418453371554510 0.00444747405369375 0.00465190217283092 0.00478997044119910 0.00485458902276784 0.00483961912060174 0.00474007591465845 0.00455230038332262 0.00427414635198550 0.00390511807138668 0.00344650099182296 0.00290147208418596 0.00227514678419768 0.00157463484944940 0.000809017829767649 -1.06840744378252e-05 -0.000871601417753359 -0.00175913421107009 -0.00265712670734394 -0.00354805884695401 -0.00441329761330148 -0.00523336707777231 -0.00598824652859538 -0.00665771080970000 -0.00722166513441986 -0.00766051819656856 -0.00795554628515692 -0.00808926695830632 -0.00804579778713380 -0.00781121198122165 -0.00737385557398501 -0.00672465411265528 -0.00585737296908383 -0.00476883822076922 -0.00345912046377592 -0.00193165277071010 -0.000193306186818875 0.00174560152167793 0.00387135316116739 0.00616694426266682 0.00861224714301304 0.0111842454480643 0.0138573114065071 0.0166035434564277 0.0193931490766125 0.0221948631223289 0.0249764067493405 0.0277049663610968 0.0303476915980842 0.0328722022141803 0.0352470959118215 0.0374424420524016 0.0394302650358943 0.0411849919541939 0.0426838690715275 0.0439073342956993 0.0448393358723475 0.0454675971286805 0.0457838200411591 0.0457838200411591 0.0454675971286805 0.0448393358723475 0.0439073342956993 0.0426838690715275 0.0411849919541939 0.0394302650358943 0.0374424420524016 0.0352470959118215 0.0328722022141803 0.0303476915980842 0.0277049663610968 0.0249764067493405 0.0221948631223289 0.0193931490766125 0.0166035434564277 0.0138573114065071 0.0111842454480643 0.00861224714301304 0.00616694426266682 0.00387135316116739 0.00174560152167793 -0.000193306186818875 -0.00193165277071010 -0.00345912046377592 -0.00476883822076922 -0.00585737296908383 -0.00672465411265528 -0.00737385557398501 -0.00781121198122165 -0.00804579778713380 -0.00808926695830632 -0.00795554628515692 -0.00766051819656856 -0.00722166513441986 -0.00665771080970000 -0.00598824652859538 -0.00523336707777231 -0.00441329761330148 -0.00354805884695401 -0.00265712670734394 -0.00175913421107009 -0.000871601417753359 -1.06840744378252e-05 0.000809017829767649 0.00157463484944940 0.00227514678419768 0.00290147208418596 0.00344650099182296 0.00390511807138668 0.00427414635198550 0.00455230038332262 0.00474007591465845 0.00483961912060174 0.00485458902276784 0.00478997044119910 0.00465190217283092 0.00444747405369375 0.00418453371554510 0.00387146535017828 0.00351701818746309 0.00313007140413667 0.00271948730281080 0.00229392012417828 0.00186166324289692 0.00143053208388114 0.00100772453164355 0.000599741347354387 0.000212299935351519 -0.000149707455755329 -0.000482274164853227 -0.000782233321702366 -0.00104732198481596 -0.00127608195492862 -0.00146786697682690 -0.00162278241215030 -0.00174159750910226 -0.00182570593193012 -0.00187701749208392 -0.00189788127172278 -0.00189097766637378 -0.00185928906733429 -0.00180589925759426 -0.00173408181065602 -0.00164705119499090 -0.00154801344160982 -0.00144006351645474 -0.00132609119057247 -0.00120880306967688 -0.00109065219696278 -0.000973821570661108 -0.000860172219979632 -0.000751403500145107 -0.000648642391154511 -0.000553072375674049 -0.000465250710479947 -0.000385685714917851 -0.000314661819136746 -0.000252110168682686 -0.000197830221279244 -0.000151516770302790 -0.000112686510060271 -8.07452320330076e-05 -9.71409323488429e-05];
% plot(Ua)
fs=2000000;
for(i=1:length(Ua))
if(Ua(i)>1)
Ua(i)=300;
end
if(Ua(i)<-1)
Ua(i)=-300;
end
end
z=Ua.*Dane;
% plot(z)
FIR=Num;
y=conv(z,FIR);
%plot(y)
% plot(abs(fft(y)));
for(i=1:length(y))
if(y(i)>100000)
y(i)=25;
else
y(i)=-25;
end
end
plot(y)
Message = RS232(y,4800,2000000)
char(Message')
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}