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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:29:11+00:00 2026-06-05T10:29:11+00:00

I am calculating PT1 behavior in Matlab using the input vector u: u(20:50,1) =

  • 0

I am calculating PT1 behavior in Matlab using the input vector u:

u(20:50,1) = 2;
k = 0.8;
x=zeros(50,1);
for i=2:size(u,1)
    x(i) = k*x(i-1) + (1-k)*u(i);
end

How can I remove the for loop to get the same result?

  • 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-05T10:29:12+00:00Added an answer on June 5, 2026 at 10:29 am

    This is actually a first-order IIR filter, so you can use filter for that:

    u(20:50, 1) = 2;
    k = 0.8;
    x = filter(1 - k, [1, -k], u);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When calculating math.factorial(100) I get: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000L Why is there an L at the end
I'm calculating the Euclidean distance between n-dimensional points using OpenCL. I get two lists
I am calculating the difference between two times and i am able to get
I’m calculating the inactive interval of a particular user using the following code: inActiveInterval
So I am calculating an equation so that I can echo out a statistic.
I'm interested in calculating the physical position of a node in QTreeView and can't
Can anyone post a SQL query for Calculating Total No. of Orders per Day?
I am calculating the size of a file upload in PHP, to format in
I am calculating some very large numbers using Python, and I'd like to store
I am calculating current time Interval using following codes: NSTimeInterval tInt=[[NSDate date] timeIntervalSince1970]; int

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.