Answered
Extract low-frequency coefficients of Fourier transformation
If you shift the 2-D DFT, then the low frequency components will be in the center of the image: center along the row and column ...

12 years ago | 0

| accepted

Answered
How to plot histogram from two vectors
You want to use bar() x = 1:5; y = [5 3 2 6 1]; bar(x,y)

12 years ago | 0

| accepted

Answered
Set specific standard deviation limit on randn matrix?
With the Statistics Toolbox: pd = makedist('Normal','mu',0,'sigma',2); t = truncate(pd,0,4); % generate the...

12 years ago | 0

Answered
Matlab 2010 ARMA model
Do you have the System Identification Toolbox? There is armax() in R2010.

12 years ago | 0

| accepted

Answered
filteration of ecg signal using notch filter
Do you have the DSP System Toolbox? If so please see iirnotch()

12 years ago | 0

| accepted

Answered
Need some advice conderning best way to learn FFT and FFT related topics in a timely manner...
I wouldn't worry too much about understanding the FFT per se. If you understand the basics of the actual operator, the DFT, you'...

12 years ago | 0

| accepted

Answered
Why doesn't MATLAB plot?
You are not assigning the output stock to a vector, so you are just getting the latest result from the for loop. ...

12 years ago | 0

| accepted

Answered
iirnotch filter and q-factor
The above code will not work because you end up with a non-integer filter order. The filter order has to be an integer. Havin...

12 years ago | 1

| accepted

Answered
Indexing a value from a vector
If you don't know the number of iterations in advance, why use a for loop? Here, I'll test when any element of p goes negativ...

12 years ago | 0

Answered
THD calculation using FFT tool and mathematically
Do you have Signal Processing Toolbox? If you do, see the function thd()

12 years ago | 0

| accepted

Answered
How can I calculate a dirac function of 2D discrete signal
Unless I'm missing something, it's just a 1 at the location x_i,y_i in your matrix. For example: X = zeros(20,20); X(10,10...

12 years ago | 0

Answered
Sum using vectorized commands and colon operator instead of loops.
Yes, it basically makes sense although what you have would not actually work in MATLAB because you need the "dot" operator for e...

12 years ago | 1

| accepted

Answered
What is observation in correlation matrix?
"observations" here just means the values of the variables. Assume that you collect weight and height data on 5 people. Put the ...

12 years ago | 1

| accepted

Answered
I want FFT plot of a motor data mat-file. It is of 10kHz frequency but I'm not getting the peaks of the plot at 50 Hz frequency. What corrections are needed? And how to write comments for the FFT plots drawn between frequency vs amplitude?
Without your data it is difficult to say exactly, but your frequency vector is in radians/second, not cycles/second, so could yo...

12 years ago | 0

| accepted

Answered
Polyfit() does not seem to work well for some straight lines. Is there a good alternative?
Your x-vector is not monotonic, that is one major issue. Then you create this vector, xTest, which runs from -5 to 5 when the...

12 years ago | 1

Answered
how could i print '%' in matlab? using fprintf
fprintf('%d is my age, i got %d %% in my test\n',19,100)

12 years ago | 0

Answered
how to know the indices of multiple max values?
One way: A = [4 5 9 9]; maxval = max(A); lia = ismember(A,maxval); idx = find(lia); or shorter maxval = ma...

12 years ago | 3

| accepted

Answered
how to apply ica for european st t database?
Please see: <http://research.ics.aalto.fi/ica/fastica/ Fast ICA> And read the tutorials and papers provided there.

12 years ago | 0

| accepted

Answered
The inverse of the Marcum-Q function
Do you have the Communications System Toolbox? See the help for qfuncinv.m If you don't have the CST, you can use erfcinv....

12 years ago | 0

Answered
how to i attain a matrix with 1 to n
See my comment above. If you want us to fill the remaining elements with zeros. dims = input('Provide the row and column di...

12 years ago | 0

| accepted

Answered
What does "plot(spectrogram(M))" mean?
If the function you are using is the MathWorks' version of spectrogram, then you are plotting a complex-valued function. I don't...

12 years ago | 0

Answered
horizontal bar graphs/ figures
You have to realize that in a stacked bar plot you really have 2 bar plot objects, not 3 like you seem to think. You can modify...

12 years ago | 0

| accepted

Answered
bar type graph/ figure
A = [50 25; 5 5 ; 25 50]; barh(A,0.75,'stacked'); xlabel('Seconds'); set(gca,'yticklabel',{'Green','Yello...

12 years ago | 0

| accepted

Answered
bar type graph/ figure
You can do something like this: A = [50 25; 5 5 ; 25 50]; barh(A,0.75,'grouped'); xlabel('Seconds'); s...

12 years ago | 0

Answered
Need help fixing a function error
You don't want to call the function inside of a for loop, you want to write the loop inside of the function Also, Matt J star...

12 years ago | 0

Answered
Creating Loop using while
I have no trouble saving the M-file func.m in a folder on the MATLAB path, then executing >> r = func which returns 0.01 ...

12 years ago | 0

Answered
Error when trying to Publish from m file
If I enter the following: %% Water Density vs. Temperature % This plots the density of freshwater as a function...

12 years ago | 0

| accepted

Answered
write matrices in notepad
I think you can do this: Either create a column vector in MATLAB and then just use save -ascii For example: x = ...

12 years ago | 0

| accepted

Answered
How to scale PSD/Pwelch highest point to 0dB?
Can't you just scale the PSD estimate, Pxx, by the maximum value? You did not provide your OFDM signal, so I'll just create a...

12 years ago | 0

Answered
Filtering out high frequency content from test data
I would not worry about the sampling frequency differing at the 9th decimal place. Can you provide some more specifics: When ...

12 years ago | 0

Load more