function PP = from_C_to_Matlab
% This script reads real and imaginary components of the complex pressure
% from files cI.txt and cR.txt in order to represent the waveform.

load cI.txt
load cR.txt
[ni nj]=size(cI);   
st=0.002;
rA = 1.193;
cA = 346;
t=0.;
i=0.;
while t<=4*pi
    i=i+1;
    Pn=0.;
    for n=1:nj
        Pn=2*rA*cA*cA*(cI(1,n)*sin(n*t)+cR(1,n)*cos(n*t))+Pn;
    end
    PP(i)=Pn;
    t=t+st;
end


plot(PP);

end

