Réponse apportée
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 ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

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

plus de 12 ans il y a | 2

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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; ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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);...

plus de 12 ans il y a | 0

Réponse apportée
3D to 2D matrix and then drop the NANS?
A = reshape(b,24,1); A = A(~isnan(A));

plus de 12 ans il y a | 0

Réponse apportée
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 ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
How long does a PCA anaysis take?
That depends on the size of the matrix. Have you tried it?

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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; ...

plus de 12 ans il y a | 0

Réponse apportée
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_{...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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(). ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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;...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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';

plus de 12 ans il y a | 1

Réponse apportée
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 = ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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,...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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. ...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 1

Charger plus