Answered
identifing the beginning and the end of a series
I = find(diff(x)==1); J = find(diff(x)== -1); I is 1 and 14, J is 8 and 21

14 years ago | 1

| accepted

Answered
Surf() Question
U=(frame_cntr.*10)./10000; The above must be a vector, but in order to use surf(), this must be a matrix. For example: ...

14 years ago | 0

Answered
Matlab-code for SVD
Hi, You cannot see that code. It is a built-in function.

14 years ago | 0

Answered
Display Loop Values in a Matrix?
One way is to just collect the values into a matrix inside the loop and display outside C = zeros(3,3); for n = 1:9 ...

14 years ago | 1

Answered
Compression ratio for wavelets
Hi, if you are using wdencmp(), then use the optional output argument PERF0. If you use wcompress(), use the output argument,...

14 years ago | 0

| accepted

Answered
wcompress
You need to extend the one dimension of your image to the next power of 2 - 64x64x3, you can pad with zeros, see wextend() for h...

14 years ago | 0

| accepted

Answered
decompressing an compressed image
I'm not sure what you mean here by decompress, but what you have implemented is lossy compression so you cannot "invert" your pr...

14 years ago | 0

Answered
"Sprand" problem
Hi Atta, I think perhaps you have some non-MathWorks function on your path that precedes the MathWorks' version. That line shoul...

14 years ago | 0

Answered
how to pick the number in my command window
Use find() on the second column of the matrix with the 'first' option, then use that index to return the corresponding value in ...

14 years ago | 0

| accepted

Answered
Need help with a For loop or any loop with some sort for my code
If you have the Signal Processing Toolbox, you can use buffer: y = randn(5e4,1); y1 = buffer(y,5e3); Then take yo...

14 years ago | 0

Answered
How to make the x-axis on a logarithmic scale while keeping the y-axis in dB?
semilogx(f,10*log10(Nc))

14 years ago | 3

| accepted

Answered
significant correlation values
You can return the p-values from corrcoef a = 0; b = 1; data1 = a + (b-a).*rand(100,1); data2 = a + (b-a)....

14 years ago | 0

Answered
storing values in for loop
Looks like you C is a 1x4 row vector and A 4x4. If you want to store the results as rows of a matrix B = A; ...

14 years ago | 1

| accepted

Answered
Do what Excel does in curve fitting in Matlab
Are you really sure you want to force the line to go through zero? Do you have the Statistics Toolbox? If so, use regress() ...

14 years ago | 0

Answered
Simple Linear Algebra problem that's confusing me.
I don't want to just give you the answer, but think of it this way 1.) Think of the typical eigenvalue problem, I'll use B as...

14 years ago | 0

Answered
plot and ignore certain values
You can set those values to NaN x(x == -1) = NaN; plot(x) They will show up as gaps in your plot.

14 years ago | 4

| accepted

Answered
plot and ignore certain values
You can just plot x for x~= -1 or did you mean that the character array "-1" is entered? Not sure what you mean by the " ". ...

14 years ago | 0

Answered
Cell Array
One way: x = {[1,2,3] [2,4] [1] [1,2,3] [5] [2,4] [1]}; y = cellfun(@num2str,x,'uniformoutput',false); xnew = uniq...

14 years ago | 0

Answered
dwt3
I'm not sure what you are asking. You can zero out everything in the output of wavedec3 except those subbands you are interested...

14 years ago | 0

Answered
SEPARABLE 3D WAVELET TRANSFORM???????
You can use wavedec3 in the Wavelet Toolbox, that is a separable 3-D discrete wavelet transform

14 years ago | 0

Answered
Delete elements in a array
So when you say "array", you mean a 1-D vector? X = randn(49121,1); indices = 390:391:length(X); X(indices) = [];...

14 years ago | 4

| accepted

Answered
Delete elements in a array
X = randn(100,100); % not sure how far you want the vector to go indices = 390:391:1e4; X(indices) = []; Then you'll...

14 years ago | 0

Answered
3d plot
meshgrid() returning 81x81 for situation you describe is correct, but what you indicate seems that you want to first reshape you...

14 years ago | 0

| accepted

Answered
Replacement X axis with Y axis
I don't want to download the software that site wants me to, but you can just plot the variables differently. x = -pi/2:0.01...

14 years ago | 0

Answered
How to add gaussian noise to the 1D signal
White just means that there is no correlation among the noise samples. This results in a flat power spectral density, hence the ...

14 years ago | 2

Answered
How to add gaussian noise to the 1D signal
t = 0:0.001:1; x = cos(2*pi*100*t)+randn(size(t)); You have to specify what you mean by 10%. It would be better if you...

14 years ago | 1

Answered
dwt3
Hi Slama, There are more than 4 subbands in the 3D discrete wavelet transform. There are 8 subbands. This are listed on the refe...

14 years ago | 0

Answered
code to calculate psnr and ber of an image
measerr() in the Wavelet Toolbox computes PSNR and a few other approximation quality measures.

14 years ago | 0

Answered
I need to calculate power spectral density of a signal in MATLAB.
because you computed the DFT of a vector to length 1024, only 513 points are "positive" frequencies. Why not just use spectru...

14 years ago | 0

Answered
I need to calculate power spectral density of a signal in MATLAB.
You are calculating your frequency vector for a one-sided PSD estimate, but then you try to plot the PSD estimate for the entire...

14 years ago | 0

| accepted

Load more