Respondida
How to use the index ? how to drop elements from a matrix ?
One of many ways: b= [ 0.0913 NaN NaN NaN 0.0913 NaN NaN NaN 0.0913 ...

más de 12 años hace | 0

| aceptada

Respondida
how to filter a signal using firlpnorm???
Have you read the documentation for firlpnorm()? firlpnorm() seems like a sophisticated filter design for just a sine wave in ad...

más de 12 años hace | 0

| aceptada

Respondida
How to randomly select entire row from matrix?
A = randn(198220,15); idx = sort(randperm(size(A,1),100)); B = A(idx,:);

más de 12 años hace | 2

Respondida
Image processing from MATLAB to C
If you are going to start writing the code from scratch. I would consider openCV in the area of computer vision: <http://open...

más de 12 años hace | 0

| aceptada

Respondida
3D to 2D matrix and then drop the NANS?
You can just reshape the transposes of each "page" c1 = reshape(b(:,:,1)',12,1); c2 = reshape(b(:,:,2)',12,1); C = [c1; ...

más de 12 años hace | 0

| aceptada

Respondida
how to match both the side?
If it's a simple matter of assigning matrices, then your syntax works. outimg = zeros(256,256,3); out1img = ones(256,256);...

más de 12 años hace | 0

Respondida
3D to 2D matrix and then drop the NANS?
A = reshape(b,24,1); A = A(~isnan(A));

más de 12 años hace | 0

Respondida
Spectrogram windowing- why do the 2 methods generate different graphs?
That is a different question. The answer to that question is that calling spectrogram() with no output arguments is the same as ...

más de 12 años hace | 0

| aceptada

Respondida
Spectrogram windowing- why do the 2 methods generate different graphs?
Here I use your signal and they are identical: FS = 100; w1=2; w2=5; w3=40; t=0:1/FS:10; dt = 1/FS; x = zero...

más de 12 años hace | 0

Respondida
power spectral density PSD?
Hi Mary, If you have the Signal Processing Toolbox, the easiest thing is to use periodogram() I'll create some simulated sign...

más de 12 años hace | 1

Respondida
Spectrogram windowing- why do the 2 methods generate different graphs?
Are you sure you are using MathWorks' version of spectrogram() and/or hamming()? Because I see no difference at all (and there s...

más de 12 años hace | 0

Respondida
How long does a PCA anaysis take?
That depends on the size of the matrix. Have you tried it?

más de 12 años hace | 0

| aceptada

Respondida
Why do I get the error message Error using calculate (line 2) Not enough input arguments.
You can't write a function definition that expects inputs a,b, and c and then only try to provide them with an input statement i...

más de 12 años hace | 0

Respondida
how to generate and plot uniform distributions?
If you have the Statistics Toolbox -- unifpdf() For example, U(2,5) X = 2:0.01:5; A = 2; B = 5; ...

más de 12 años hace | 0

Respondida
arima : why MA polynomial needs be invertible ?
MA models are required to be invertible because of non-uniqueness. For example, consider an MA(1) model: X_t = W_t+\theta W_{...

más de 12 años hace | 0

| aceptada

Respondida
How to do complex bandpass filter in matlab?
You have to use cfirpm() not firpm() and then specify your constraints. For example: b = cfirpm(30,[-1 -.5 -.4 .7 .8 ...

más de 12 años hace | 0

Respondida
Generating a single pulse in time?
See my earlier answer for how to do it. Using your if statement approach, when t is a vector how do you expect the if stateme...

más de 12 años hace | 0

Respondida
Frequency content of a tachometer signal
Just looking at your signal, why would you expect anything more from the Fourier transform than energy at the fundamental freque...

más de 12 años hace | 0

Respondida
spectral analysis for discontinuous time series data
You have a couple options: 1.) You can interpolate the missing data and obtain interpolated values for the missing data. 2...

más de 12 años hace | 1

Respondida
How do you replace the entry of a matrix with a string?
You can't technically replace an entry of a matrix with an entire string. You would require a cell array for that. You can conve...

más de 12 años hace | 1

| aceptada

Respondida
Generating a single pulse in time?
You did not tell us the sampling frequency so I'll just assume it is 1 Hz in my example. t = 0:1:1000; s = 0.01*o...

más de 12 años hace | 0

Respondida
Matlab problem, not sure how to solve a certain simultaneous equation?
For a unit vector, cos(\theta) is just the x-coordinate and sin(\theta) is the y coordinate, so look at the help for atan2(). ...

más de 12 años hace | 0

| aceptada

Respondida
Extract one element from row vectors?
In addition to Azzi's suggestion you can use A(A~=max(A)) but keep in mind that both will remove multiple values if the m...

más de 12 años hace | 1

Respondida
Why is DFT phase different from FFT phase?
The DFT is a linear operator from \mathbb{C}^N to \mathbb{C}^N. Your vector sin(t) for the argument values you have defined i...

más de 12 años hace | 0

| aceptada

Respondida
NANMEANs for each (n,m) position over several matrices with the same size
Not sure if this is what you're asking but: A=[1 2 NaN;4 5 6;7 NaN 9]; B=[NaN 2 3;NaN NaN 6;7 8 9]; C=[NaN NaN NaN;...

más de 12 años hace | 0

| aceptada

Respondida
hanning ,hamming window in matlab?
If you have row vectors you have to make the necessary adjustment. Just convert them to column vectors. s1 = s1';

más de 12 años hace | 1

Respondida
How can I use " imfindcircles" ?
Hi Christine, you may want to increase the sensitivity a bit. Here, use the file I attach and run the following code. im = ...

más de 12 años hace | 0

| aceptada

Respondida
Find the last position of maximum value in a Matrix
You can use find() with the 'last' argument: x = randi([1 10],100,1); maxval = max(x); I = find(x==maxval,...

más de 12 años hace | 0

| aceptada

Respondida
change the step in x label
Use 'xtick' I'll do an example with Gaussian distributed data but I doubt you really want to space the ticks for every integer. ...

más de 12 años hace | 0

Respondida
hanning ,hamming window in matlab?
That depends on how they are in your workspace. If you have 20 separate vectors, then just do this. I'll assume they are colu...

más de 12 años hace | 1

Cargar más