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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:44:51+00:00 2026-05-24T12:44:51+00:00

I have a n-dimensional vector (1xn dataset, and it is not image data), and

  • 0

I have a n-dimensional vector (1xn dataset, and it is not image data), and I want to apply a Gaussian filter to it. I have the Image Processing Toolkit, and a few others (ask if you need a list).

Presumably I can make the hsize parameter of the fspecial function something like [1 n].
Can I still use imfilter to apply it to my vector as the next step, or should I be using something else?

I’ve seen quite a few examples on how to apply a Gaussian filter to two dimensional image data in Matlab, but I’m still relatively new to Matlab as a platform so an example would be really good.

Note: I’m not currently in a position to just try it and see what happens (not currently on a machine with Matlab installed), otherwise I would have tried it first and only asked if I ran into problems using fspecial and imfilter.

  • 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-05-24T12:44:52+00:00Added an answer on May 24, 2026 at 12:44 pm

    Why not create the Gaussian filter yourself? You can look at the formula in fspecial (or any other definition of a Gaussian):

    sigma = 5;
    sz = 30;    % length of gaussFilter vector
    x = linspace(-sz / 2, sz / 2, sz);
    gaussFilter = exp(-x .^ 2 / (2 * sigma ^ 2));
    gaussFilter = gaussFilter / sum (gaussFilter); % normalize
    

    and in order to apply it you can use filter:

    y = rand(500,1);
    yfilt = filter (gaussFilter,1, y);
    

    and don’t forget the filter has latency, which means the filtered signal is shifted as compared to the input signal. Since this filter is symmetric, you can get a non-shifted output by using conv instead of filter, and use the same option:

    yfilt = conv (y, gaussFilter, 'same');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a one dimensional vector of data in R and I want to
I have n=10000 10-dimensional vectors. For every vector v1 I want to know the
i have a std::vector, namely vector<vector<vector> > > mdata; i want pass data from
I have a 2 Dimensional input data; a set of vector with 2 components,
I have a two dimensional array that I need to load data into. I
I have a 2-dimensional array of objects and I basically want to databind each
I have a two-dimensional array (of Strings) which make up my data table (of
I have a three-dimensional array that I want to reset to zero. It seems
I have a class Vector that represents a point in 3-dimensional space. This vector
I have X , a three-dimensional array in R. I want to take a

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.