답변 있음
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 ...

12년 초과 전 | 0

| 수락됨

답변 있음
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...

12년 초과 전 | 0

| 수락됨

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

12년 초과 전 | 2

답변 있음
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...

12년 초과 전 | 0

| 수락됨

답변 있음
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; ...

12년 초과 전 | 0

| 수락됨

답변 있음
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);...

12년 초과 전 | 0

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

12년 초과 전 | 0

답변 있음
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 ...

12년 초과 전 | 0

| 수락됨

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 1

답변 있음
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...

12년 초과 전 | 0

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

12년 초과 전 | 0

| 수락됨

답변 있음
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...

12년 초과 전 | 0

답변 있음
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; ...

12년 초과 전 | 0

답변 있음
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_{...

12년 초과 전 | 0

| 수락됨

답변 있음
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 ...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 1

답변 있음
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...

12년 초과 전 | 1

| 수락됨

답변 있음
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...

12년 초과 전 | 0

답변 있음
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(). ...

12년 초과 전 | 0

| 수락됨

답변 있음
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...

12년 초과 전 | 1

답변 있음
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...

12년 초과 전 | 0

| 수락됨

답변 있음
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;...

12년 초과 전 | 0

| 수락됨

답변 있음
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';

12년 초과 전 | 1

답변 있음
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 = ...

12년 초과 전 | 0

| 수락됨

답변 있음
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,...

12년 초과 전 | 0

| 수락됨

답변 있음
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. ...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 1

더 보기