# v_lpcls2ar

## PURPOSE

V_LPCLS2AR convert line spectrum pair frequencies to ar polynomial AR=(LS)

## SYNOPSIS

function ar=v_lpcls2ar(ls)

## DESCRIPTION

    V_LPCLS2AR convert line spectrum pair frequencies to ar polynomial AR=(LS)
     input vector elements should be in the range 0 to 0.5

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

## SOURCE CODE

    0001 function ar=v_lpcls2ar(ls)
    0002 %V_LPCLS2AR convert line spectrum pair frequencies to ar polynomial AR=(LS)
    0003 % input vector elements should be in the range 0 to 0.5
    0004
    0005
    0006 %      Copyright (C) Mike Brookes 1997
    0007 %      Version: $Id: v_lpcls2ar.m 10865 2018-09-21 17:22:45Z dmb $
    0008 %
    0009 %   VOICEBOX is a MATLAB toolbox for speech processing.
    0010 %   Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html
    0011 %
    0012 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    0013 %   This program is free software; you can redistribute it and/or modify
    0014 %   it under the terms of the GNU Lesser General Public License as published by
    0015 %   the Free Software Foundation; either version 3 of the License, or
    0016 %   (at your option) any later version.
    0017 %
    0018 %   This program is distributed in the hope that it will be useful,
    0019 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
    0020 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    0021 %   GNU Lesser General Public License for more details.
    0022 %
    0023 %   You can obtain a copy of the GNU Lesser General Public License from
    0024 %   https://www.gnu.org/licenses/ .
    0025 %
    0026 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    0027
    0028 [nf,p]=size(ls);
    0029 p1=p+1;
    0030 p2 = p1*2;
    0031 ar=zeros(nf,p1);
    0032 for k=1:nf
    0033   le=exp(ls(k,:)*pi*2i);
    0034   lf=[1 le -1 conj(fliplr(le))];
    0035   y=real(poly(lf(1:2:p2)));
    0036   x=real(poly(lf(2:2:p2)));
    0037   ar(k,:)=(x(1:p1)+y(1:p1))/2;
    0038 end