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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 2

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

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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; ...

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 1

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

Beantwortet
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; ...

mehr als 12 Jahre vor | 0

Beantwortet
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_{...

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 1

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

mehr als 12 Jahre vor | 1

| akzeptiert

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

mehr als 12 Jahre vor | 0

Beantwortet
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(). ...

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 1

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

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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;...

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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';

mehr als 12 Jahre vor | 1

Beantwortet
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 = ...

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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,...

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 1

Mehr laden