Answered
Error in convolution and i need someone to help me .
I'm assuming you want this: x(t>=0 & t<=5)=exp(-t(t>=0 & t<=5)); h(t>=0 & t<=5) = exp(-2*t(t>=0 & t<=5)); Your mist...

13 years ago | 2

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

13 years ago | 0

| accepted

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

13 years ago | 0

| accepted

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

13 years ago | 2

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

13 years ago | 0

| accepted

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

13 years ago | 0

| accepted

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

13 years ago | 0

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

13 years ago | 0

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

13 years ago | 0

| accepted

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

13 years ago | 0

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

13 years ago | 1

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

13 years ago | 0

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

13 years ago | 0

| accepted

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

13 years ago | 0

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

13 years ago | 0

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

13 years ago | 0

| accepted

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

13 years ago | 0

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

13 years ago | 0

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

13 years ago | 0

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

13 years ago | 1

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

13 years ago | 1

| accepted

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

13 years ago | 0

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

13 years ago | 0

| accepted

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

13 years ago | 1

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

13 years ago | 0

| accepted

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

13 years ago | 0

| accepted

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

13 years ago | 1

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

13 years ago | 0

| accepted

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

13 years ago | 0

| accepted

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

13 years ago | 0

Load more