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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:53:29+00:00 2026-06-17T14:53:29+00:00

EDIT: I would like to make a plot based on the following code: function

  • 0

EDIT: I would like to make a plot based on the following code:

function one(varargin)
    thresh = 200;
    setenv GNUTERM 'x11';
    x = [0.05:0.05:10];
    x = transpose(x);
    y = rand(200, 1); 
    y(y <= 0.9) = 0.9;
    plot(x, y); 
    xlabel('time');
    ylabel('values above thresh');
end

… The thing is, I don’t want it to be just jumpy points. It would be nice to see the values smoothly undulating from one to the next (like a bezier curve). Is this possible?
I don’t know if I would need an external library for this, but I’m willing to go that route if necessary. It would be nice to export the resulting (smooth) plot at any data resolution.

  • 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-17T14:53:30+00:00Added an answer on June 17, 2026 at 2:53 pm

    If I’m reading this correctly, you just want to downsample this information, which is quite an easy, efficient task in octave.

    Given xi,yi as your original dataset, and you’d like to do roughly 10x downsampling:

    Generate a new x vector, xp (assuming xi is montotonic increasing):

    xp = linspace(xi(1),xi(end),round(length(xi)/10)); 
    

    Then use interpolation with a spline method:

    yp = interp1(xi,yi,xp,'spline');
    

    However, this only smooths the interpolated data.

    I didn’t really follow parts of your question – how do you define essential portions?

    An alternative could be to filter the data before you downsample, for example, with a Savitsky-Golay filter. The fun thing here is that there’s a few parameters you can play with. For a default:

    yp = sgolayfilt (yi);
    

    This filter uses a smoothing polynomial of order p and length n to process your data. IF you specify p and n, you can play around with what might work best:

    yp = sgolayfilt (yi, p, n);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to make a function which does the following if (vim is
EDIT : Scroll down to see the updated code. I would like to build
I have this line: $(#clients-edit-wrapper).height($(window).height()-150); I would like to apply that height function to
I have these three sub arrays, I would like to make one array that
I would like to make an NSSearchField, just like the one in Ecoute 3.0.
I would like to edit matlab scripts in two cases (1) In matlab Command
I would like to place an edit control (WC_EDIT) on a static control (WC_STATIC).
I would like to know how I could edit mp3 files on the server
I would like to write a script which will edit multiple XML files, I
I would like the user to be able to edit the title of the

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.