Answered
frequency-time of EMG
Here you go: Fs = 1000; t = 0:1/Fs:5; x = 2*cos(2*pi*100*t).*(t<1)+3*cos(2*pi*200*t).*(t>1 & t<2)+1.5*cos(2*pi*15...

12 years ago | 0

Answered
frequency-time of EMG
If you want to find the median frequency with respect to time, you'll have to use the short-time Fourier transform (or some othe...

12 years ago | 0

| accepted

Answered
the use of Regress
Yes, you should include a vector of ones. The vectors of ones represents the constant term in the linear regression. In other wo...

12 years ago | 0

Answered
How to compare two vectors with numbers?
A = randi(10,10,1); B = 1:5:50; [IA,IB] = ismember(A,B);

13 years ago | 0

Answered
Extract data at regular intervals
Are you asking for just X = ones(2e4,2); Y = X(1:10:end,:); Y is a two-column matrix containing every 10-th measureme...

13 years ago | 1

| accepted

Answered
help me to learn image processing using matlab
You can work through the Image Processing Toolbox tutorials, otherwise, there is a good textbook: <http://www.amazon.com/Digi...

13 years ago | 0

| accepted

Answered
pls i need a code that can be used to detect the peak of signal (peak detector)
Do you have the Signal Processing Toolbox, have you looked at findpeaks()?

13 years ago | 0

Answered
Odd results from Fourier Transform
Hi, You are correct. There is a peak around 7 Hz. A couple things, the signal has a nonzero mean, which results in the DC (zero ...

13 years ago | 1

| accepted

Answered
I am working on eeg signals. In feature extraction process,I want to subdivide the spectrum into frequency subbands. Plz suggest me how to do so.
If I understand your methodology, you are obtaining an AR spectral estimate using the Yule-Walker method and then you want to sp...

13 years ago | 0

Answered
How do you call a nested function?
You want to put the nested function inside another function (as the term nested implies) and then call the top-level function. A...

13 years ago | 3

| accepted

Answered
How can I randomly select a row from a matrix?
m = randn(17543,17); idx = randperm(size(m,1),1); B = m(idx,:); idx tells you which row you randomly selected. If ...

13 years ago | 0

Answered
How can I get a time-frequency representation of the resulted details and approximation signals from a discrete wavelet transform?
That is much easier to do with the continuous wavelet transform. You can certainly plot the wavelet coefficients with the approp...

13 years ago | 0

| accepted

Answered
decimation in dwt is
The problem is that you should first set the dwtmode to 'per' to get the subband sizes you expect. dwtmode('per'); loa...

13 years ago | 0

Answered
Query about Butterworth filter
Your sampling frequency is 10 Hz as you correctly note. Therefore you should construct your cut_off_freq exactly as you do excep...

13 years ago | 0

| accepted

Answered
Need HDL Coder immediately
You will need to contact MathWorks for that: <https://www.mathworks.com/products/hdl-coder/> In the right hand column, the...

13 years ago | 0

Answered
Mean a matrix columnwise based on another logical matrix
you mean just: mean(a.*b) or do you want the mean of just the nonzero entries? In other words, divide by the right numbe...

13 years ago | 0

Answered
set(0, 'DefaultAxesBox', 'off') is not honored by plot()!?
plot() modifies some of the axes properties, 'Box' is one of those. The simplest thing to do is just define a new function that ...

13 years ago | 2

| accepted

Answered
summary statistics in matlab
See the help for grpstats() and use the whichstats input to specify various group statistics.

13 years ago | 1

| accepted

Answered
how to download softdm in matlab R2010
You can get that here: <http://www.mathworks.com/matlabcentral/fileexchange/11359-optical-communications-systems-softdm-ver-1...

13 years ago | 0

| accepted

Answered
Problem with toolbox filter design?
Assume that Fil1 is your filter object, if you enter class(Fil1) does it return dfilt.df2sos? If so, then depending on...

13 years ago | 0

Answered
What does this line of code mean in non-code speak?
div4, div100, and div400 are all logical variables, 1 or 0. if (div4 & ~(xor(div100,div400))) says "if div4 is true (1) ...

13 years ago | 0

| accepted

Answered
How to find same contents in two array and print them in new array?
A = [1;15;52;65;81]; B = [2;7;15;40;65;84;96]; C = intersect(A,B,'rows')

13 years ago | 0

Answered
Denoising by Donoho algorithm
You want to use the thresholded coefficients in the reconstruction. You also made a couple other errors in your code. I =...

13 years ago | 2

| accepted

Answered
suppose i have a sinusoidal wave with multiple frequencies in it..and it dies out after some time...just like the plot of sprung mass displacement subjected to damping...i referred various videos ..in which they represented the main signal into a for
If you know the frequencies, amplitudes, and phases, then yes, it is very easy to construct signal which is a superposition of s...

13 years ago | 0

| accepted

Answered
How can plot integral for sin wave
Use the integrator block. If you attached a sine wave block to an integrator block (in the Continuous library), you will get wha...

13 years ago | 0

Answered
How should I understand this code
This does not look like it produces white Gaussian noise. For example: n = 1000; m = 1; p=1+rand(1)*99; Gaussian_nois...

13 years ago | 0

| accepted

Answered
How do I calculate the area under a curve?
The upper limit is not a function, you just have to find where tan(x) is equal to x+3, so your limits of integration are [0, tan...

13 years ago | 0

| accepted

Answered
Median line representation in boxplot
Can you please show an example, because the color of the median line defaults to red. So I don't think I understand what you're ...

13 years ago | 0

| accepted

Answered
How can plot integral for sin wave
t=0:0.1:360*22/7/180; x1=sin(t); dt = t(2)-t(1); x2 = cumsum(x1.*dt); x2 = x2-1-x2(1); plot(t,x2) Or ...

13 years ago | 0

Answered
why doesn't my "if" statement work?
You don't need an if statement, you can use logical indexing. A = randn(8,1); B = randn(8,1); Z = B./A; Z(Z<1) = A(Z<...

13 years ago | 0

| accepted

Load more