Answered
A For Loop Question.
You do not need a for loop for this x = [1 8 3 9 0 1]; sin(x) In this: i=1; while (i<=10) disp(i); i =...

14 years ago | 0

Answered
Comparing images
You could do diffim = double(X)-double(Y);

14 years ago | 1

Answered
filter coefficients
That depends. The filter coefficients are the coefficients of the difference equation. If your filter is an FIR filter, then the...

14 years ago | 1

| accepted

Answered
cumsum of a matrix
X = 1:100; X = reshape(X,10,10); X1 = cumsum(X(:));

14 years ago | 0

Answered
time series plot
Did you use datenum and datetick? t = (1900:10:1990)'; % Time interval p = [75.995 91.972 105.711 123.203 ...

14 years ago | 0

Answered
wav format data type in matlab
You most likely did not use the format option available in wavread.m [y,fs] = wavread(file,'native'); If omitted, this...

14 years ago | 1

| accepted

Answered
how to calculate central frequency from fft of wave function
It appears to me that just rewriting that using trigonometric identities you see that it equals 1/2*sin(2*pi*f*t)-1/4*sin(2*p...

14 years ago | 0

Answered
"This kind of expression is not supported"
Hi Adam, have you read this: <http://www.mathworks.com/help/toolbox/eml/ug/bq5zw7l-1.html>

14 years ago | 1

Answered
how to calculate central frequency from fft of wave function
Are you trying to show us an AM signal? If so, are the two f's really the same frequency, or did you mean something like this: ...

14 years ago | 0

Answered
anova1 within groups degree of freedom ?
strength = [82 86 79 83 84 85 86 87 74 82 78 75 76 77 79 79 77 78 82 79]; alloy = {'st','st','st','st','st','st','st','st',...

14 years ago | 1

| accepted

Answered
command in Matlab equivalent to "forall " in fortran
A = 1:10; A = A.^2;

14 years ago | 2

Answered
blanks
s = 'Have you tried deblank? ' s1 = deblank(s); length(s) length(s1)

14 years ago | 0

Answered
matrix
If n and r are not equal, you can't. Unless there are some details that you are not telling us.

14 years ago | 0

Answered
Tidal prediction
Hi Dany, you are most likely not scaling the estimates by the length of the input vector. For example. t = 0:0.001:1-0.001...

14 years ago | 1

| accepted

Answered
Error in linear regression with predefined error in y
polyfit returns a least-squares fit, but not with weights as you suggest. Do you have the Statistics Toolbox? If so consider, ro...

14 years ago | 0

Answered
How to set yaxis equal to each other in a subplot of two scalograms made from two different Motherwavelet?
OK, so explain to me what is wrong with this. Yes, of course you will have to use different scale vectors for different mother w...

14 years ago | 0

| accepted

Answered
error in storing values
Don't use the same variable below, use a different variable. PSNR = 20 * log10 (255 / sqrt(S)); PSNRS(xx) =PSN...

14 years ago | 0

| accepted

Answered
Finding matches for a vector
Use ismember [~,locb] = ismember(a,signal_vector,'rows'); locb is equal to 5

14 years ago | 0

| accepted

Answered
which pem is called by pem_
How about just using dbstop in FILESPEC to set a breakpoint for pem.m?

14 years ago | 0

Answered
Storing matrix value
A = [ 6 2 3 7 9 0 8 3 4]; [minval,I] = min(A(1,:)); z = A(2:end,I);

14 years ago | 0

Answered
which pem is called by pem_
It's calling matlab\toolbox\ident\ident\pem.m

14 years ago | 0

Answered
How to set yaxis equal to each other in a subplot of two scalograms made from two different Motherwavelet?
Hi Katrine, Have you tried set(gca,'ylim',[minfreq maxfreq]) So something like: t = linspace(0,5,5e3); x = co...

14 years ago | 0

Answered
How to generate random 1x8 integer matrices without repeating numbers in Simulink?
If you have Communications System Toolbox, you can use the random integer block. If you do not have Communications System Toolbo...

14 years ago | 0

| accepted

Answered
how to define 'Y' in fitensemble function (Matlab 2011a)
If you are doing classification as you are with 'AdaBoostM', then Y should be a categorical variable, character array, or cell a...

14 years ago | 0

Answered
calculating the time
Just save the CR values in a vector, then query which one is the max

14 years ago | 0

Answered
cell of string. Vectorization on elements of string
stringCell{1,1}='test1' ; stringCell{2,1}='test2'; out = cellfun(@(x) x(5),stringCell,'UniformOutput',0); out = str2nu...

14 years ago | 0

| accepted

Answered
calculating the time
You can use tic and toc. t = zeros(1,100); for n = 1:100 A = rand(n,n); b = rand(n,1); tic x = A...

14 years ago | 1

| accepted

Answered
??? Undefined function or method 'fftshow' for input arguments of type 'double'.
What is fftshow.m ? That is not a MathWorks' function or method. If you have downloaded this MATLAB program from somewhere and s...

14 years ago | 0

Answered
Where is PDF version of the DSP Reference manual?
Hi KE, Honglei is correct about the general location of the PDF documents. However, MathWorks is no longer producing PDFs of ref...

14 years ago | 0

| accepted

Answered
Filter design - are taps the same are difference equation coefficients?
Yes, they are. The filter coefficients are also call taps, or tap weights.

14 years ago | 0

| accepted

Load more