Technical discussion about Matlab and issues related to Digital Signal Processing.
Hello, I'm little confused about AR (p) model because I don't know what input signal x I shoud use for example in Matlab function aryule(X,p) in order to get AR coefficients. Is there any other better way to do this? I want to generate autocorellation functions for order p=20,50,100 and 200. How can I do this? What parametars do I need? Thank you in advance!
Hello, In Matlab using aryule(X,p), X is the system input that you want to model and p is the order of the system. Once you give these you will get the AR functions. You dont need anything more. I dont if this is all what you asked. let me know if i have answered your question Blesy On Sat, 22 Apr 2006 mijonce wrote : >Hello, > >I'm little confused about AR (p) model because I don't know what input >signal x I shoud use for example in Matlab function aryule(X,p) in >order to get AR coefficients. Is there any other better way to do this? >I want to generate autocorellation functions for order p= ,50,100 and >200. How can I do this? What parametars do I need? > >Thank you in advance! >
Hi
In AR model, the input is the noise signal, and this model is used to
predict the signal X from its past values and the input noise.
But in that case we already have established the model and know the
model parameters.
But in the case when you want to establish this model, you require some
signal (X) which you want to fit into this model. In the case of
function aryule(X,p), this is the input signal and output are the model
parameters. Using these parameters and the error (noise) signal now you
can predict the next values of X.
The other way can be to write your own Yule Walker equation and solve
it, instead of relying on the inbuilt function !!!
The simple code may be ::
C = xcorr(x,'biased'); % Autocorrelation Computation (Rxx)
Rxxm = C(length(C)/2 : length(C)/2 + M - 1); % Truncating
appropriately %for order M
Rxxm_mat = toeplitz(Rxxm); % Generating Toeplitz Matrix
Rxxm_vect = C(length(C)/2 + 1 : length(C)/2 + M ); % Generating
%Rxx(p+1) vector
a = inv(Rxxm_mat) * Rxxm_vect'; % Solve Yule Walker Equation for
%calculating AR parameters (a's)
> I want to generate autocorellation functions for order p=20,50,100
> and
> 200. How can I do this? What parametars do I need?
For this you may use the above function xcorr or the function autocorr.
For this you require only the signal of which you want to calculate the
autocorrelation. See "help autocorr" and "help xcorr" for more details.
Other group members, please correct me if I am going wrong somewhere.
Hope this helps
Nishit
--- mijonce <m...@yahoo.co.uk> wrote:
> Hello,
>
> I'm little confused about AR (p) model because I don't know what
> input
> signal x I shoud use for example in Matlab function aryule(X,p) in
> order to get AR coefficients. Is there any other better way to do
> this?
> I want to generate autocorellation functions for order p=20,50,100
> and
> 200. How can I do this? What parametars do I need?
>
> Thank you in advance!
>
>
>
Nishit Jain
M.Tech IIT Guwahati
Great minds have purposes, little minds have wishes.
__________________________________________________