Answered
how do I fix the seed in the trnd function
I'm not sure why you want to do that since you can use rng() without using the legacy mode by removing those calls and using rng...

13 years ago | 0

| accepted

Answered
how do I fix the seed in the trnd function
Don't do that. Don't call rand('state', ) before using rng. rng seeds the random number generator for you. Remove that from a...

13 years ago | 0

Answered
WHY THIS ERROR OCCUR ''??? Subscript indices must either be real positive integers or logicals."
The problem is that you have a vector, tn, that goes in increments of 0.1, but you cannot access elements of another vector y() ...

13 years ago | 0

Answered
data comparision in matlab
A = [1 7;2 8;3 9;4 10;5 11;6 12]; B = [2 8;1 6;4 9;3 9;6 12;8 1;0 15]; lia = ismember(A,B,'rows'); Anew = A(lia>0...

13 years ago | 0

| accepted

Answered
explanation for script containing while loop
I'm not sure I understand your question. Presumably, the first fgetl() call does not obtain the string *END*, so the string comp...

13 years ago | 1

| accepted

Answered
write in text file
You can use ischar() to query which elements are strings and write those properly.

13 years ago | 1

| accepted

Answered
how to write a program in matlab for to identify the energy level in given speech signal
I think you need to define for us what you mean by _energy level_ If you just mean the norm of the vector, the speech sample,...

13 years ago | 0

Answered
How can I plot spectrogram without using function "spectrogram"?
To replicate the plotting behavior of spectrogram.m, use surf() z = randn(100,100); t = 1:100; x = 1:100; surf...

13 years ago | 5

| accepted

Answered
Z-test with 2 samples
Why not use the two-sample t-test? I think there are very few situations in which the two-sample z-test is going to give you som...

13 years ago | 0

Answered
for loop execution problem
I do not have any difficulty with either of these for loops colonysize = 6; siz = 5; bee = randn(3,5); for i = 1:colo...

13 years ago | 0

Answered
How do I plot this simple function in matlab
Did you simply want to plot that complex-valued function of a real variable, f(x), you can do that with stem3 x= -50:50; ...

13 years ago | 0

| accepted

Answered
Magnitude of output signal after fourier transform filter?
Can you give us an example? What do you mean by "the peaks I want have lost magnitude?" Presumably you are talking about a time-...

13 years ago | 0

Answered
About FFT of sine wave
It is because you have 101 points in your signal. Therefore the magnitude of the DFT at the frequency is going to be approximate...

13 years ago | 2

Answered
how to use a MATLAB function called MC estimator to determine frequency?
It may be that this method is just not very robust for noise-corrupted data. For example: t = 0:159; x = cos(pi/4*t); ...

13 years ago | 0

Answered
How to find Haar Wavelet transform of an image
If you have the Wavelet Toolbox, you can use dwt2, or wavedec2

13 years ago | 0

Answered
How do you label the different eeg channels
You can create a structure array with the field names corresponding to the electrode site, or whether it is EOG, etc...

13 years ago | 0

Answered
downsampling / reducing fft data for log plot
_To make it a bit more clear: The fft results have a sampling rate of 100Hz: 100Hz, 200Hz, 300Hz,...1e8Hz When I plot the spectr...

13 years ago | 0

Answered
Function intrlv in Matlab 2012a
That is not accurate. intrlv.m is part of R2012a. Perhaps the issue is that you do not have the Communication System Toolbox in ...

13 years ago | 0

| accepted

Answered
downsampling / reducing fft data for log plot
If you have the Signal Processing Toolbox, you can use goertzel.m to compute the DFT at specified frequencies. For example: ...

13 years ago | 0

Answered
Subscripted assignment dimension mismatch.
Because the output of dec2bin() is a char array of a certain number of elements. You do not tell us what Result1 is, but suppos...

13 years ago | 0

Answered
histogram without Y axis
hist(randn(100,1)); set(gca,'ytick',[])

13 years ago | 1

Answered
Log of 10 base "b" where 'b' is defined as 1 to 10 in increments of 1
Well it seems you have it above: log2(8) is just log(8)/log(2) So you can get the log to an arbitrary base...

13 years ago | 3

Answered
How can I plot a comb function?
You can simply create a discrete-time (Kronecker delta) impulse and repeat that. For example: x = 0:(2*pi)/1000:pi-(2*pi)/10...

13 years ago | 0

| accepted

Answered
Tapering out a waveform.
The classic answer to this problem is to multiply the signal by a "window" such as the Hamming window, so if X is your signal. ...

13 years ago | 0

| accepted

Answered
How to rectify the following code
The problem is that you are attempting to reshape a vector but you are changing the number of elements. For example: x = ...

13 years ago | 0

Answered
How create a signal?
Your signal is just a superposition (sum) of shifted unit step sequences. For t = -1,0,1,2 m2(t) = 1 For t = 3,4,5 m2(t...

13 years ago | 0

Answered
Filtering spectrum using FIR filters
You can do the following: Let B be your vector of FIR coefficients and x your signal. I'll just present an example with a whi...

13 years ago | 0

Answered
Power cross-spectral density
That is not correct. The cross spectrum (the Fourier transform of the cross correlation) is not real-valued. The cross spectrum ...

13 years ago | 1

| accepted

Answered
How to create a 7 X 7 window?
You can use blockproc() to apply some processing on blocks of a prescribed size.

13 years ago | 0

Answered
How to use the fitting curve of a histogram?
If you think that a Gaussian distribution provides a good fit, you can use normfit() with your data to get the estimates of mu a...

13 years ago | 0

Load more