IM given a question on matlab programming.(adsbygoogle = window.adsbygoogle || []).push({});

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

end

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matlab programming

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Matlab programming | Date |
---|---|

How to program this in Matlab | Feb 28, 2018 |

Does anyone had this plotting problem with MATLAB? | Dec 23, 2017 |

How do I extract elements of a random matrix masked by a circle with its center at A(15,26) | Sep 15, 2016 |

MATLAB how to automatically read a number of files | Oct 29, 2015 |

What is program is better mathematica or matlab? | Jun 14, 2015 |

**Physics Forums - The Fusion of Science and Community**