Answered
array division
If you have the Signal Processing Toolbox, you can use buffer() x = randn(16,1); y = buffer(x,4); Otherwise, you ca...

14 years ago | 0

| accepted

Answered
plot square with a given average value
t = 0:.0001:.0625; y = square(2*pi*30*t)-2; plot(t,y); set(gca,'ylim',[-3.5 -0.5]); hold on; grid on; ...

14 years ago | 0

Answered
speech processing
I think Signal Processing Toolbox, DSP System Toolbox, and Statistics Toolbox would be sufficient. Depending on how much code yo...

14 years ago | 0

| accepted

Answered
Signal Processing
If you have the Signal Processing Toolbox, there are a number of functions for this. >>doc aryule >>doc arburg as...

14 years ago | 1

| accepted

Answered
mscohere function
Hi Raf, You can't specify the frequencies of interest as an input argument, but you can easily extract the mean-square coherence...

14 years ago | 0

| accepted

Answered
How does one make a wav file?
Here is an example Fs = 2e4; t = 0:1/2e4:1-(1/2e4); x = 1/2*cos(2*pi*5000*t); % write the signal x to a .wav file ...

14 years ago | 0

Answered
IDWT
What do you mean by not the same? load woman; dwtmode('per'); [A,H,V,D] = dwt2(X,'db2'); Xrec = idwt2(A,H,V,D,'db2...

14 years ago | 0

| accepted

Answered
DWT
Hi Kush, that is because the default extension mode for the DWT is not periodic. First, set the extension mode to 'per' dwt...

14 years ago | 0

| accepted

Answered
Mean Amplitude of the signal
Hi Karolina, No, it's proportional to the amplitude squared of the Fourier coefficients. You can get amplitude estimates like th...

14 years ago | 0

| accepted

Answered
displaying complex numbers
z = 1+1j quiver(0,0,real(z),imag(z)) is one way, so that z = 1+1j; w = 3-1j; quiver(zeros(2,1),ze...

14 years ago | 0

Answered
trying to create a new vector from 2 vectors.
y is definitely a column vector, is y1 a row vector? iscolumn(y) isrow(y1) If you do y = y'; That should fi...

14 years ago | 0

Answered
Mean Amplitude of the signal
Hi Karolina, You can find the average power of the signal in the [3,10] Hz band. If you have the Signal Processing Toolbox. ...

14 years ago | 0

Answered
Using imwrite after DWT and IDWT
Hi Vikas, Interesting application. Your problem is just scaling before you write the .jpg file. Without scaling, virtually al...

14 years ago | 0

| accepted

Answered
Older, legacy toolboxes
These questions are always best addressed to MathWorks.

14 years ago | 0

Answered
XLSWRITE
filename = input('Enter the file name:\n','s');

14 years ago | 0

Answered
Find value in second column when first column is x
indices = find(A(:,1) == 3); A(indices,2) Or indices = find(A(:,1)>2 & A(:,1) <6); A(indices,2) Or A...

14 years ago | 0

| accepted

Answered
basic code question
That is a function handle.

14 years ago | 0

Answered
How do I create a single random number between two values?
Does it have to be an integer, or any number between 1e3 and 9e3? For the former: Int = randi([1e3 9e3],1,1); For the...

14 years ago | 5

| accepted

Answered
wavelet compression
Hi Aravind, What you want to do to actually see the savings in compression is to look at the wavelet coefficients, not the synth...

14 years ago | 0

Answered
psudo random sequences
Can't you just call the random number generator twice x = randn(1e3,1); y = randn(1e3,1); If you look at the cross-co...

14 years ago | 0

| accepted

Answered
How to combine an cell array and a double array
I think you should give us a very simple concrete example with MATLAB code. x = {'2','3','4'}; y = cellfun(@str2double,x...

14 years ago | 0

Answered
Can anybody spot the error in this simple program?
Daniel's absolutely correct. You're writing your inequalities like you would write them on a piece of paper, but MATLAB is a pro...

14 years ago | 1

Answered
read and write data from .mat file
Do you have the DSP System Toolbox? You can use dsp.MatFileReader For example: filename = [tempname '.mat']; % Create v...

14 years ago | 0

Answered
calculating PSNR
The Wavelet Toolbox has a function for this, measerr() >>doc measerr

14 years ago | 0

Answered
Problem using nanmean
nanmean was available in version 7.0.1 but you have to have the Statistics Toolbox. Do you have the Statistics Toolbox in your i...

14 years ago | 2

Answered
How to generate pseudo random number with fix range ?
You can generate uniform random numbers between 1 and 9 with: R = 1+8*rand(1000,1);

14 years ago | 0

Answered
Simple 2D plot; Any way I can use String for xtick?
Hi, Yes, there are a number of ways. Here is one: y = [33 55 66 77]; plot(y) set(gca,'xtick',1:4); set(gca,'xtic...

14 years ago | 1

| accepted

Answered
Using imwrite after DWT and IDWT
imwrite() converts images to RGB before writing a jpeg file. Can you please try writing a .png file and see if you have the s...

14 years ago | 0

Answered
Calculating energy
Hi Raf, you should do this: _should i multiply power values * frequency then add up the result_ BUT you want to multiply b...

14 years ago | 0

Answered
separate and regenerate
You can first transform the number into a string: x = 3456; y = num2str(x); y = [y(1) '13' y(3:end)]; x1 ...

14 years ago | 0

| accepted

Load more