Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8689017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:31:42+00:00 2026-06-12T23:31:42+00:00

I am struggling with declaring some more complex matrices in matlab, perhaps you could

  • 0

I am struggling with declaring some more complex matrices in matlab, perhaps you could help me out,
I have an array of $T$ values / lets call it $y = [y_0, \hdots, y_T]$ (its a digital signal representing a sound).

I am using formula:

\begin{equation}
    y_t= a_0 + \sum_{i=1}^p  (a_i y_{t-i} + \epsilon_t), t \geq p,
\end{equation}

in order to create a synthetic signal based on the one give using only previous $p$ values of $y_t$, where $p$ is significantly smaller than y. What I have to do, is find those $a_0, \vdots, a_p$ parametres in order to use LSE method.

Now here is what I need you guys to help me with:
How do I create a matrix that looks like this:

\begin{equation}
    M =
    \begin{bmatrix}
        1 & 0 & 0 & 0 & 0 & \hdots & 0 \\
        1 & y_0 & 0 & 0 & 0 & \hdots & 0 \\
        1 & y_1 & y_0 & 0 & 0 & \hdots & 0 \\
        1 & y_2 & y_1 & y_0 & 0 & \hdots & 0 \\ 
        \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\
        1 & y_{T-1} & y_{T-2} & \hdots & \hdots & \hdots & y_{T-p} \\
    \end{bmatrix}
    \in R^{T+1xp+1}
\end{equation}

Thanks for any help

edit: how to format LaTeX here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:31:46+00:00Added an answer on June 12, 2026 at 11:31 pm

    You seem to need a matrix that represents a sort of convolution. In Matlab the toeplitz function is relevant here.

    See the following example

    >> y=[1 2 3 4 5 6 7];
    >> toeplitz(y,[y(1) zeros(1,length(y)-1)])
    
    ans =
    
     1     0     0     0     0     0     0
     2     1     0     0     0     0     0
     3     2     1     0     0     0     0
     4     3     2     1     0     0     0
     5     4     3     2     1     0     0
     6     5     4     3     2     1     0
     7     6     5     4     3     2     1
    

    So your code should look like the follwing

     M = [ones(length(y),1)  toeplitz(y,[y(1) zeros(1,length(y)-1)]) ];
     M = M(:,1:p+1);  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been struggling to understand some pieces of this code. It asks to
Struggling with command line again, I have figure out that I can store the
I have been struggling trying to figure out how to conditionally include Flex libraries
Struggling with one aspect of my code that I hope someone could shed some
Struggling with styling the mouse over for a button ... I have managed to
Im struggling with this one. I have a list of items and on a
Iam struggling with NHibernate and its lazyload. I have a structure which I simplified
been struggling with an issue now for a day or two. I have an
Struggling with the following problem. I have an attribute that defines the name of
Struggling a bit today. I have the following method that returns a list of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.