Answered
Gaussian FFT
Try plotting the absolute value of the frequency domain amplitudes... when your Gaussian is not centered at time 0, the phase ma...

12 years ago | 1

| accepted

Answered
Anyone using MATLAB on a LINUX OS??
Works fine for me on Redhat... running it on a 12-core, 96GB machine at work. Any simple-ish benchmarks you looking to test/meas...

12 years ago | 0

Answered
I want to plot PSD for my input data(meters)
If you are measuring displacement in meters in the time domain, then your frequency domain amplitudes (after performing the FFT)...

12 years ago | 0

| accepted

Answered
Difference between fft and manually coding for a fourier transform
You are not correctly defining the frequencies "k" that are associated with the amplitudes in the frequency domain, but it start...

12 years ago | 0

| accepted

Answered
Scaling of fft output?
See my answer here: <http://www.mathworks.com/matlabcentral/answers/15770-scaling-the-fft-and-the-ifft> In order to conse...

12 years ago | 0

Answered
Is there any alternative to if statements inside for loops?
Do you pre-allocated "Pin", if not... then before the for-loops put: Pin = zeros(8760,Ni); The inside of your for-loops ...

12 years ago | 0

Answered
impulse response interpretation
I reran through the process of generating the Frequency Response data (G) using your code and the one from the FEX just to see i...

12 years ago | 0

Answered
from time domain to frequency domain and back to time domain
Your "X" has shifted the zero frequency amplitude to the center. You need to use *ifftshift* to get it back where Matlab expects...

12 years ago | 0

| accepted

Answered
I cant generate a square wave in matlab using the square wave command
If you dont have the Signal Processing Toolbox, will the following work as an alternative: y = sign(sin(2*pi*100*t));

12 years ago | 2

Answered
obtain the Impulse response from a frequency response
N = 1000; % Number of samples df = 20; % Frequency increment (in Hertz) Nyq = 10000; % Nyquist Frequency (in Hertz) ...

12 years ago | 4

| accepted

Answered
Can my integration code for an accelerometer data work for a Square wave?
Instead of trying to convert using your code, try mine located here: <http://www.mathworks.com/matlabcentral/answers/21700-fi...

12 years ago | 0

| accepted

Answered
Help With Plot Legend
If you are just trying to apply the 3 legend strings to 3 lines on a plot, then all you need to do is: legend(cell) Take...

12 years ago | 0

Answered
What does x(1,:) do in MATLAB ?
"a0" is the Fourier Transform of the first row of "at" at(2,:) % gives the second row at(3,:) % gives the third row (and s...

12 years ago | 14

| accepted

Answered
Interpreting frequency using pwelch function
1/26.0893 years per sample equals roughly 1208771.41 seconds per sample, which is roughly equivalent to an Fs of 8.27286276e-07 ...

12 years ago | 0

Answered
if statement for range of array values
I think what you might be after is something like: if all(x(i-1:i+1) < xmax) || all(y(i-1:i+1) < ymax) % something e...

12 years ago | 0

Answered
Rows
a = rand(1000,5); b = min(a,[],2);

12 years ago | 1

| accepted

Answered
Question about fft
The way it is implemented above, the value at 0 frequency is just the sum of your signal from -1 seconds to 1 second (you have a...

12 years ago | 0

Answered
quick easy question
It looks like "t" is an array of numbers, therefore you need to incorporate a "." before you multiply "(B1*cos*(Omega_d*t) + B2*...

12 years ago | 0

Answered
Create a array of 1 and -1
Not the most efficient, but: >> a=nchoosek([1,2,3,4,5,6,7,8],4); >> b = ones(size(a)); >> b(mod(a,2)==0) = b(mod(a,2)==0)...

12 years ago | 0

Answered
FFT single-sided amplitude spectrum plot spike at 1Hz of accelerometer data
As a general rule of thumb, I will remove any trend and/or mean from the data before I run it through FFT.

12 years ago | 0

| accepted

Answered
why fgetl read spaces?
If they are all just numbers on the line, then converted the string to numeric should do the trick new_t = str2num(t);

12 years ago | 1

Answered
Matrix of statuses or matching; discrete one-to-one mapping
You can't do this with any old NxK matrix, it must be a square NxN matrix. Otherwise your condition, that the sums of individual...

12 years ago | 0

| accepted

Answered
plotting the frequency spectrum
Your "f" looks off. For your configuration (which uses fftshift): N = length(y); dt = x(2)-x(1); % Time increment Nyq = 1...

12 years ago | 0

Answered
How to extract correct FFT?
Just to eliminate a few things, try this: dt = time(2)-time(1); Fs = 1/dt; M = length(gage); N = pow2(nextpow2(M)); ...

12 years ago | 0

| accepted

Answered
Alternative to using "unix(sprintf('ls %s/*/*/*.out',pathname))" ?
I ran a test... Running this from Matlab: [~,List] = unix(sprintf('ls %s/*/*/*.out',pathname)); And then doing some m...

12 years ago | 0

| accepted

Answered
How to create 'density' plot from 2d scatter data
Check out the example for *hist3* in the Help navigation window... maybe useful here.

12 years ago | 1

Answered
combine ARRAYS
doc cat This should work, too: C = [A ; B];

12 years ago | 0

| accepted

Answered
Sequence within a sequence
To beat a dead horse... I thought I remembered a version by Walter using *cumsum*, but I couldn't find the link. Here's my at...

12 years ago | 1

Answered
Calculating energy
In order to obtain energy, do not even worry about the power. Just do this: Using "*y*" and "*f*" from the output of spectrog...

12 years ago | 1

| accepted

Answered
Guide- coma
Yes. Every time the user types something and then hits enter, or tab, or clicks somewhere else in the GUI, etc. the callback fun...

12 years ago | 0

Load more