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 7957189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:12:42+00:00 2026-06-04T04:12:42+00:00

Given a differential equation: y[n] – 0.9y[n-1] + 0.81y[n-2] = x[n] – x[n-2] a.

  • 0

Given a differential equation:
y[n] - 0.9y[n-1] + 0.81y[n-2] = x[n] - x[n-2]

a. Find the impulse response for h[n], n=0,1,2 using recursion.

b. Find the impulse response using MATLAB command filter.

  • 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-04T04:12:43+00:00Added an answer on June 4, 2026 at 4:12 am

    I understand that this is homework, so I will try to give you guidelines without actually giving away the answer completely:

    Using recursion

    This is actually quite simple, because the differential equation contains the body of the recursive function almost entirely: y[n] = 0.9y[n-1] – 0.81y[n-2] + x[n] – x[n-2]

    The parts in bold are actually the recursive calls! What you need to do is to build a function (let’s call it func) that receives x and n, and calculates y[n]:

    function y = func(x, n)
       if (n < 0)
          %# Handling for edge case n<0
          return 0
       else if (n == 0)
          %# Handling for edge case n=0
          return x(0)
       else
          %# The recursive loop
          return 0.9 * func(x, n-1) - 0.81 * func(x, n-2) + x(n) - x(n-2)
       end
    

    Note that it’s pseudo-code, so you still have to check the edge cases and deal with the indexation (indices in MATLAB start with 1 and not 0!).

    Using filters

    The response of a digital filter is actually the y[n] that you’re looking for. As you probably know from lesson, the coefficients of that filter would be the coefficients specified in the differential equation. MATLAB has a built-in function filter that emulates just that, so if you write:

    B = [1, 0, 1];        %# Coefficients for x
    A = [1, 0.9, -0.81];  %# Coefficients for y
    y = filter(B, A, x);
    

    You’d get an output vector which holds all the values of y[n].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to solve a differential equation for a pendulum movement, given the pendulum
Due to DSolve syntax, systems of differential equations have to be given as lists
I have written a program to approximate the solutions to ordinary differential equations using
I have a differential drive robot, using odometery to infer its position. I am
Given the following table: id category_id categorizable_id categorizable_type 66 22 67 Image 72 22
Given: Two vertically placed elements on the screen (ViewPager and Fragment) Action in the
Given the following conditions: two BigDecimal values: b1 and b2 ; x - Integer;
Given the above dynamically generated text (meaning that I can't just use an image),
Given: var input_val = $('#field').val(); How do I check whether input_val contains only numbers
Given: class StringRecord : INotifyPropertyChanged { public string Key { get; set; } //

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.