CR4® - The Engineer's Place for News and Discussion®

 Previous in Forum: Fagor CNC Threading Error 017 Next in Forum: PC Display Automation
Active Contributor

Join Date: Jan 2017
Posts: 14

# Matlab Question

02/18/2017 2:32 PM

please help me in finding the frequency of this graph in matlab. and tell me how to find the value of X axis when Y axis is at 0.

Interested in this topic? By joining CR4 you can "subscribe" to
Guru

Join Date: May 2009
Location: Richland, WA, USA
Posts: 20095
#1

### Re: matlab

02/18/2017 2:52 PM

So far, the frequency is 2 day-1.

Also so far, y = 0 when x ≈ 0, 3, 5.4, and 7.7.

__________________
In vino veritas; in cervisia carmen; in aqua E. coli.
Guru

Join Date: Apr 2010
Posts: 5986
#2

### Re: matlab

02/18/2017 5:01 PM

x 10-4

Guru

Join Date: May 2009
Location: Richland, WA, USA
Posts: 20095
#3

### Re: matlab

02/18/2017 5:16 PM

__________________
In vino veritas; in cervisia carmen; in aqua E. coli.
Guru

Join Date: Sep 2016
Posts: 778
#4

### Re: matlab

02/19/2017 2:53 AM

oh well. Gee...that guy, frequency, probably has a bird feet.

Score 1 for Off Topic
Guru

Join Date: Jan 2007
Location: In the bothy, 7 chains down the line from Dodman's Lane level crossing, in the nation formerly known as Great Britain, and now disconnecting ["brexit" - ugh] as Little England and Wales (not too sure about Wales bit, either). Kettle's on.
Posts: 27044
#5

### Re: Matlab Question

02/20/2017 3:27 AM

Assuming the image is in the time domain, then from simple inspection the fundamental frequency is 1/2.5x104. However, the trace is a saw-tooth, and not a sine wave. Therefore there will be a number of other frequencies of various amplitudes, which are expressible as multiples of the fundamental frequency. When these are added together and added to the fundamental, the result is the saw tooth shown in the image.

Converting the image from the time domain into the frequency domain would be an interesting exercise. There is mathematics available to do this and the reference books needed are some distance away from this poster's computer.

__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856
Associate

Join Date: May 2016
Location: Ohio, USA
Posts: 35
#6

### Re: Matlab Question

02/20/2017 2:24 PM

review your Nr3 code first. from the graph, looks like something is missing.

"Numerical Recipes" the art of Scientific computing (FORTRAN)

You may be better off posting in a different forum if you want someone to do the work for you. try link below.

http://www.edaboard.com/forum.php

FYI; End code should look something like this.

plotindex = -fs/2:fs/length(N):fs/2;
plotindex = plotindex(1:max(N));
stem(plotindex, X);
title('X(k): Frequency (Hertz) on X-Axis');
xlabel('Frequency (Hertz)');
ylabel('Magnitude (Absolute Value)');
axis([-fs/2 fs/2 0 80]);

blahh blahh blahh

__________________
If you cant say anything nice , dont say anything at all.
Off Topic (Score 5)