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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:57:41+00:00 2026-05-13T09:57:41+00:00

I would like to plot the greasy test signal in Matlab, and then plot

  • 0

I would like to plot the “greasy” test signal in Matlab, and then plot a Gauss function in the same plot. The script below does that.

But I would like to be able to place the Gauss function at a certain position, so I see that others often use CIRCSHIFT to move plots.

When I use it I can move the Gauss function to the left or right, but not up and down.

PGAUSS used in the script comes from the LTFAT DSP third party toolbox, but it could for debugging be any function. E.g. -x^2.

Can someone figure out, what I am doing wrong?

Here is how it looks with [0 0]
alt text http://img268.imageshack.us/img268/1130/66837635.png

Here is how it looks with [0 111]
alt text http://img684.imageshack.us/img684/2386/0111q.png

Here is how it looks with [111 0]
alt text http://img194.imageshack.us/img194/8760/1110d.png

Lots of love,
Louise

g = greasy;

fs = 16000;
Lg = length(g);

% -2441 so just get the first 500 points
L2 = floor(Lg/2)+1 - 2441;

gf = greasy;
gf = gf(1:L2);

hold on
plot (1:L2,gf);
xlabel('Time / samples');
ylabel('Amplitude');

% Contructing values to make the plot look as desired
L = 500;
tfr = 1;
cent = 300;

%gw = pgauss(L,tfr,cent)
% Here I would have expected the Gauss function to be
% moved down, but nothing happens.
gw = circshift(pgauss(L,tfr,cent), [0 -1]);
plot(gw,'Color','red');

% Multiply the signal with the Gauss window
figure(2);
plot(gf.*gw);
  • 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-13T09:57:41+00:00Added an answer on May 13, 2026 at 9:57 am

    What you want to do is to add a constant factor to Gauss function to move it up or down.

    B = [1,2,3,4,5]

    B =

    1 2 3 4 5

    size(B)

    ans =

    1 5

    circshift(B,[2 0])

    It does nothing because B has only one row, so this row returns to its original position regardless of value of rowshift

    ans =

    1 2 3 4 5

    circshift(B,[0 2])

    ans =

    4 5 1 2 3

    B + 5

    ans =

    6 7 8 9 10

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

Sidebar

Ask A Question

Stats

  • Questions 258k
  • Answers 258k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I tested this solution with Simple Modal and it works… May 13, 2026 at 11:04 am
  • Editorial Team
    Editorial Team added an answer Ok, forgive me for how large this is. I thought… May 13, 2026 at 11:04 am
  • Editorial Team
    Editorial Team added an answer yep. that's right. May 13, 2026 at 11:04 am

Related Questions

I have an SVM in R and I would now like to plot the
I am new to python and am having trouble finding the correct syntax to
In an effort to help populate the R tag here, I am posting a
I am working on an idea wherein I have to identify lines in a
This is a really really simple question to which I seem to be entirely

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.