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

quasi 12 anni fa | 1

| accettato

Risposto
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...

quasi 12 anni fa | 0

Risposto
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)...

quasi 12 anni fa | 0

| accettato

Risposto
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...

quasi 12 anni fa | 0

| accettato

Risposto
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...

quasi 12 anni fa | 0

Risposto
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 ...

quasi 12 anni fa | 0

Risposto
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...

quasi 12 anni fa | 0

Risposto
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...

quasi 12 anni fa | 0

| accettato

Risposto
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));

quasi 12 anni fa | 2

Risposto
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) ...

quasi 12 anni fa | 4

| accettato

Risposto
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...

quasi 12 anni fa | 0

| accettato

Risposto
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...

quasi 12 anni fa | 0

Risposto
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...

quasi 12 anni fa | 14

| accettato

Risposto
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 ...

quasi 12 anni fa | 0

Risposto
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...

quasi 12 anni fa | 0

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

quasi 12 anni fa | 1

| accettato

Risposto
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...

quasi 12 anni fa | 0

Risposto
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*...

quasi 12 anni fa | 0

Risposto
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)...

quasi 12 anni fa | 0

Risposto
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.

quasi 12 anni fa | 0

| accettato

Risposto
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);

quasi 12 anni fa | 1

Risposto
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...

quasi 12 anni fa | 0

| accettato

Risposto
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...

circa 12 anni fa | 0

Risposto
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)); ...

circa 12 anni fa | 0

| accettato

Risposto
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...

circa 12 anni fa | 0

| accettato

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

circa 12 anni fa | 1

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

circa 12 anni fa | 0

| accettato

Risposto
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...

circa 12 anni fa | 1

Risposto
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...

circa 12 anni fa | 1

| accettato

Risposto
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...

circa 12 anni fa | 0

Carica altro