Answered
Signal statistics check: oscillations and jumps about mean
Yes, I think you can. Use the optional output argument, P, for the short-time PSD estimates. [S,F,T,P] = spectrogram(...)

13 years ago | 1

| accepted

Answered
Combine rand function with exponential cdf
Perhaps you're thinking of generating exponentially distributed random numbers based on a uniform (0,1) RV? x = rand(1000,1)...

13 years ago | 1

Answered
signal compression using wavelet transform
Yes, it is very similar to denoising using wavelets. One difference is that with denoising you often do NOT set the coefficients...

13 years ago | 0

| accepted

Answered
Reverse an array by for loop
Why a for loop? a = [1 2 3 4 5] ; b = fliplr(a); If you must with a for loop for ii = 1:length(a) b(ii) = a(...

13 years ago | 0

| accepted

Answered
How can i pin point a single frequency component both in time and frequency domain.
You will only be able to localize it within a time-frequency region. The area of that region in the time-frequency plane depends...

13 years ago | 0

Answered
Upgrade option from 2011a to 2012b for Student Edition?
For these types of questions, it's always best to contact MathWorks directly. You can look at the FAQ for the student version...

13 years ago | 1

Answered
Dividing a sine function with scalar values - why do i get a complex double vector?
The issue is that in your asin(), you have values outside of [-1,1] that is what is causing your output, y, to be complex-valued...

13 years ago | 1

| accepted

Answered
Dividing a sine function with scalar values - why do i get a complex double vector?
I do not see that you show us how you get Winkel in cos(Winkel), so we cannot reproduce the issue, but I suspect that your expre...

13 years ago | 0

Answered
Replace NaNs with previous values
How about: A = [ 4 5 6 7 8 32 NaN NaN 21 NaN 12 NaN 12 NaN NaN 34 NaN N...

13 years ago | 0

Answered
Why won't "bar" graphing function work?
y = [75.995,91.972,105.711,123.203,131.669,... 150.697,179.323,203.212,226.505,249.633,281.422]; figure bar(y) ...

13 years ago | 0

Answered
Can I use "LinearModel.fit(X,y) with matlab 2011a?
LinearModel.fit was released as part of the R2012a release so you cannot use that with R2011a.

13 years ago | 0

| accepted

Answered
How can i find the centroid of the wavelet coefficients from each frame of the audio signal?
You can use wenergy() to find the energy in the output of wavedec() load noisdopp; [C,L] = wavedec(noisdopp,5,'sym4');...

13 years ago | 0

Answered
Threshold the matrix with vector
A = randn(5,3); n = [0.5 0.8 0.2]; thresh = bsxfun(@gt,A,n); B = A.*thresh; B contains nonzero ele...

13 years ago | 0

Answered
Is there any notation for the calculation of this sum ??
Why are you entering it like that? mytotal = @(c,p1,p2,a,b)sum(c.*a.^p1.*b.^p2) mytotal([1.1 1.4 0.25 ],[2 7 6],[9 4 8],10...

13 years ago | 0

Answered
changing part of the name of a variable inside a "for" loop
You can use eval() for this. For example to to get y1, y2, y3, such that y1 = x^1; y2 = x^2; x = 2; for ii =...

13 years ago | 1

Answered
Octave Band Averages from PSD
You want to average the power over octave bands? You can do that with the avgpower() method. t = 0:0.001:1-0.001 Fs = ...

13 years ago | 0

Answered
Write images from matrices in a cell array? Error?!
imwrite does not output any arguments. If you want to make a video, why are you needing to use imwrite? See the help for VideoWr...

13 years ago | 0

Answered
how to apply DWT on a image and to extract energy from all the coeffecients?
You can obtain a measure of relative contribution (percentage of energy in each of the detail images and the approximation image...

13 years ago | 0

Answered
digital signal processing problem
If your sampling frequency is 80 kHz, then to obtain 900 to 1000 samples, T must be between 0.0113-(1/80e3) and 0.0125-(1/80e3) ...

13 years ago | 0

Answered
Error undefined variable or method
It is not a MathWorks' function. The extract that you supplied seems to suggest that you are sampling from a Dirichlet distribut...

13 years ago | 0

Answered
Probability Density function plot
That very much depends on the PDF. For some distributions, the mean itself is necessary and sufficient (like the exponential), f...

13 years ago | 1

| accepted

Answered
filter.m -- output magnitude
It sounds to me like you are describing the need to compensate for the gain of the system at DC, 0 frequency. You should be to d...

13 years ago | 0

Answered
How to define a function in the command window?
t=1:1/8000:5; x =sin(2*pi*t); Have you tried to read the MATLAB documentation?

13 years ago | 0

Answered
Revised: find the frequency corresponding to max. magnitude in spectrum (FFT)
Why are you calling freqz() on the frequency response??? [freq_resp,freq]=freqz(message,1,100000,22000); [maxval,i...

13 years ago | 0

| accepted

Answered
Revised: find the frequency corresponding to max. magnitude in spectrum (FFT)
If you are using freqz(), freqz() returns the frequency vector, so just query the max value of the absolute value of the frequen...

13 years ago | 0

Answered
Error using def (line 2) Not enough input arguments.
At the command line, type >>edit def and then copy and paste your function in the editor window. Save the file as def.m ...

13 years ago | 0

Answered
Filter coefficients from poles
You can use zp2tf to form the transfer function, numerator and denominator, from the zeros, poles, and gains.

13 years ago | 0

| accepted

Answered
Is there any way to see the code of pre-loaded programs ??
flujet looks to me to just be a .mat file. It should just be data (an image) and is being loaded in the MATLAB workspace as the ...

13 years ago | 0

| accepted

Answered
Generate multiple random numbers in MatLab?
mu = 1; x = exprnd(mu,1000,1); hist(x) MATLAB random number generators all work like this; this is documented in...

13 years ago | 0

| accepted

Answered
De-Noising ECG Wavelet Disrete in Matlab using Command Line
'db1' is the Haar wavelet filter, so that is probably not the best choice. You can try wden() as one option. As an example ...

13 years ago | 0

Load more