sc=number_of_subcarriers;
fn=number_of_FFT_points;
if strcmp(InputPort1.TypeSignal, 'Binary')
    c = length(InputPort1.Sequence);
    if( c > 0 )
        b=0;
        p=1;
        while b==0  %when b=1, all elements of input vector have been modulated(Refer to lines 40 and 41).
            %Seial to Parallel and 4-QAM Modulation
            cm=0;
            for j=p:2:p+2*(sc-1)
                cm=cm+1;
                if InputPort1.Sequence(1,j)==0
                    if InputPort1.Sequence(1,j+1)==0
                        Out(1,cm)=1+1i;
                    else
                        Out(1,cm)=-1+1i;
                    end
                else if InputPort1.Sequence(1,j)==1
                        if InputPort1.Sequence(1,j+1)==1
                            Out(1,cm)=-1-1i;
                        else
                            Out(1,cm)=1-1i;
                        end
                    end
                end
            end
            %IFFT
            ortho=ifft(Out,fn);
            out1=real(ortho);
            out2=imag(ortho);
            
            %Adding Cyclix Prefix
            %Digital to Analog Converter
            %Output
            OutputPort1.Sampled.Signal=out1;
            OutputPort2.Sampled.Signal=out2;
            
            
            p=p+2*sc;
            if p>c
                b=1;
            end
        end
    end
end