Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab programming

  1. Dec 10, 2007 #1
    IM given a question on matlab programming.

    It ask to construct a numerical generative model for autoregressive model of order two;
    xt -xt-1 + 0.5t-2 = et. generate and plot 256 time series samples.

    then numerically obtain the spectrum of this time series and plot them.

    assuming noise process has variance equal to one.

    I have done something but I does look right. what i have computed is it numerical generative ?

    et = 1;
    n = 257;
    x = zeros(n-1,1);
    x(1) = rand(1)*4
    x(2) = rand(1)*8

    for t = 3:n-1;
    x(t) = x(t-1) - 0.5*x(t-2) + et
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?
Draft saved Draft deleted

Similar Discussions: Matlab programming
  1. Programming in Matlab (Replies: 4)