已回答
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 前 | 15

| 已接受

已回答
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 前 | 0

已回答
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 前 | 0

已回答
Rows
a = rand(1000,5); b = min(a,[],2);

12 years 前 | 1

| 已接受

已回答
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 前 | 0

已回答
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 前 | 0

已回答
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 前 | 0

已回答
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 前 | 0

| 已接受

已回答
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 前 | 1

已回答
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 前 | 0

| 已接受

已回答
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 前 | 0

已回答
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 前 | 0

| 已接受

已回答
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 前 | 0

| 已接受

已回答
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 前 | 1

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

12 years 前 | 0

| 已接受

已回答
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 前 | 1

已回答
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 前 | 1

| 已接受

已回答
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 前 | 0

已回答
extract sub matrix of sub matrix directly
You will have to use *reshape* if you take a sub-set a different way, e.g.: >> a = rand(3,3,3); >> b = a(1:2,1:2,1) ...

12 years 前 | 2

已回答
Inserting Zeros in a Matrix
preZeros = 5; postZeros = 2; DataCol = rand(3,1); %if really column vector NewDataCol = zeros(length(DataCol)+preZeros...

12 years 前 | 1

| 已接受

已回答
Shrink a 1-D array (vector) by removing all the columns with a value of zero
SimpleArray(SimpleArray==0) = [];

12 years 前 | 2

已回答
Open UIGETFILE on 2nd monitor
Here are some comments within *uigetputfile_helper.m* that suggest user defined locations are no longer supported in later relea...

12 years 前 | 0

已回答
frequencies from fft2 matrix
Take a look at my post here: <http://www.mathworks.com/matlabcentral/answers/24965-fft2-function-in-matlab> The example I sho...

12 years 前 | 0

已回答
Determining the second last row
If you mean you want to set "sch_cycle" to have nrows - 1, then no need to actually determine "nrows" beforehand (just use "end"...

12 years 前 | 0

提问


Generate random numbers with specific properties
Is anyone aware of something within the Statistics Toolbox (or an FEX submission) that can generate a set of M random numbers wh...

12 years 前 | 1 个回答 | 2

1

个回答

已回答
How to calculate Amplitude and phase out of FFT transform of the signal ?
This reminds me of the same issure here: <http://www.mathworks.co.uk/matlabcentral/answers/25479-sdof-frf-fft-magnitude-discr...

12 years 前 | 0

| 已接受

已回答
fprintf filename error
Is Fieldnames a string? Do: ischar(Fieldnames) if you get a 1, then it is not a cellstr and therefore cannot use {}.

12 years 前 | 0

已回答
Displaying output from .exe file to gui
I have a few GUIs that do that exactly. However, I would caution you against "continuously" checking the status of the executed ...

12 years 前 | 0

已回答
Definition of Time
DateNumber = datenum([Y, M, D, H, MN, S]) So... X = datenum(data(:,1:6))-min(datenum(data(:,1:6))); % Normalized tim...

12 years 前 | 1

| 已接受

已回答
Help with plotting multiple line complete with legends.
Something like this... x = 1 : 50; y = rand(11,50); % 11 traces, 50 samples long h = zeros(11,1); % initialize handles fo...

12 years 前 | 1

| 已接受

加载更多