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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:50:57+00:00 2026-06-13T01:50:57+00:00

I am fairly new to vibrations and using matalb fft.I am given a set

  • 0

I am fairly new to vibrations and using matalb fft.I am given a set of data (1D array) of length 15000 (not sure if this is relevant) and I am trying to figure out if there is any wave buried in this data at all. I was instructed to possibly use matlab fft. Is that the correct way to do it? what shall I expect to see? I am really not sure how to interpret any results I would get.
Please let me know what you all think.
Thanks and if more details are needed I will provide them.
Example:

% Df=[array is given to me and it is of size 15000];
% t=[time used for the above array, and if it is of the same size, also provided to me]


N_0= length(t);

fs_0=length(Dfxz);

Y_0=fft(Dfxz,N_0);

k_0=-N_0/2:N_0/2-1;

%Find the phase angle
p_0 = (angle(Y_0));
R_0 = norm(Y_0);

ff_0 = (0:length(Y_0)-1)'/length(Y_0)*100;    % Frequency vector
FT_power1_0 = abs(Y_0);

plot(k_0*fs_0/N_0,fftshift(abs(Y_0)))

I only see 1 peek at frequency = 0 but I am sure that there are non zero frequencies, what am I doing wrong?
Thanks!
PS:I am not sure how to pick the sampling frequency either? any tips please (keep in mind that I do not know the original frequency)

  • 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-13T01:50:57+00:00Added an answer on June 13, 2026 at 1:50 am

    Try my version. It looks to me like you have all the information you need to find frequency peaks in your data if they exist. If all you can see is a big peak at zero frequency, you probably have a massive DC offset that is drowning out all your other data. I have put a remedy in my code . .

    x = randn(15000,1); %//This is the data you were given - I'll use noise for demonstration - replace x with your Df data
    
    %//If youre getting a massive peak at zero that dwarfs everything else, you
    %//probably have a large DC offset. Easily removed in the time domain using
    %//the following ..
    x = x-mean(x);
    
    tAxis = linspace(3/15000,3,15000); %//You said you have this too - I'll make up something for demonstration - make sure you replace this with your t data
    dt = diff(tAxis(1:2)); %//sample period from time axis
    fs = 1/dt;%//sample rate from sample period
    
    NFFT = numel(x); %//number of fft bins - change if you like
    Y = abs(fft(x, NFFT)).^2; %power spectrum
    
    %//Calculate frequency axis
    df = fs/NFFT;
    fAxis = 0:df:(fs-df);
    
    %//Plot it all
    figure; plot(fAxis(1:NFFT/2), Y(1:NFFT/2))
    xlabel('Frequency in Hz')
    ylabel('Power')
    

    If that works out OK, you can go into more depth by checking out another FFT answer on stackoverflow.

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

Sidebar

Related Questions

Fairly new to Google Maps API. I've got an array of data that I
still fairly new to matlab, picked up this data analysis code from someone and
Fairly new to Solr/Lucene. I have a simple requirement, not sure if it is
Fairly new to Objective C and trying to work within Storyboards given it's the
I'm fairly new to C++ standard library and have been using standard library lists
Am fairly new to using MySQL and a total novice at Perl but am
Being fairly new to iPhone / Objective-C development, I wanted to ask this question
Fairly new to mysql, and I am lost at the moment. This is my
Fairly new to python, forgive me if this is a basic question about learning
fairly new Android developer here. I've come across a strange problem that I'm not

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.