Answered
how to use the mathmatical constant "e" in conjunction with a vector.
You need to post some code so we can see where you encounter an error. You can certainly use exp() with vectors. x = 1:0.0...

13 years ago | 0

Answered
Marking the peak of a plot automatically without having to click on it
Do you know the value of the peak?, then yes, it's easy. x = randn(100,1); [val,I] = max(x); plot(x); hold on; ...

13 years ago | 2

Answered
how to throw out certain intervals.
I'm confused, your original post stated: I have a vector that is used for intervals, say X = [0 5 6 9]; _I want to check w...

13 years ago | 0

Answered
how i get wavelet coefficient after 5-level?
You need to set the dwtmode to periodization dwtmode('per'); x = randn(1024,1); [C,L] = wavedec(x,5,'db4'); % ...

13 years ago | 0

Answered
how to throw out certain intervals.
X = [0 5 6 9]; y = 5+randn(10,1); for nn = 1:numel(y) if (y(nn)> X(1) & y(nn)<X(2)) disp('y is in ...

13 years ago | 0

Answered
how can i generate 2.4 ghZ sine wave code in matlab using m file
Jan's comments are appropriate here. Are you simply asking how to create a 2.4 gigahertz sine wave? dt = 1e-11; t = 0:dt:(...

13 years ago | 0

| accepted

Answered
Digital signal processing - average fit of periodic signal?
Michael, That is helpful. You can see by the following that the dominant oscillation occurs at approximately 2.15 Hz. Let ts ...

13 years ago | 0

Answered
How to combine two functions into a single expression?
You can always write one function inside the other function as a "local" function Ex: function [out] = outerfunction(...

13 years ago | 0

| accepted

Answered
HOW DO I GET AMPLITUDE AND FREQUENCY FROM A WAVE SIGNAL
Use the discrete Fourier transform. Here is an example. t = 0:0.001:1-0.001; % sampled at 1 kHz x = cos(2*pi*100*t); % 100...

13 years ago | 1

| accepted

Answered
Digital signal processing - average fit of periodic signal?
I would fit a linear model in the frequency domain. You have one clearly dominant periodicity in your data with a frequency of 1...

13 years ago | 1

Answered
Is it possible to implement continous complex morlet wavelet transform practically ?
I'm not sure what you mean by "practically", but yes you can use the Wavelet Toolbox to obtain the continuous wavelet transform ...

13 years ago | 0

Answered
calculating percentage for row values
One thing you can do emptycells = cell2mat(cellfun(@(x) ~isempty(x),final,'uni',0)); perempty = sum(emptycells(2:end,2:end...

13 years ago | 0

| accepted

Answered
is there a jump of 2 months?
The basic way to do it is using datenum() B = datenum(A,'dd/mm/yyyy'); numdays = diff(B); nummonths = numdays/30; Th...

13 years ago | 0

Answered
Modeling Filters described in frequency domain in Simulink and /or Matlab
In your particular example, that is easy: Your first filter: H(w) = e^(jw/2)*cos(w/2) is h(n) = \delta(n+1) + \delt...

13 years ago | 1

Answered
addition of elements in a matrix
Does this work for you? A = randn(3,20); B = zeros(3,4); first = 1:5:size(A,2); last = 5:5:size(A,2); kk = 1; ...

13 years ago | 0

Answered
Inserting space between values in vector
Do you have the Signal Processing Toolbox? x = [1 2 3 4]; x = upsample(x,2); If not x = 1:4; y = zeros(2*l...

13 years ago | 0

| accepted

Answered
Matlab path and undefined function
I was the one who answered your other post <http://www.mathworks.com/matlabcentral/answers/45734-input-argument-y-is-undefine...

13 years ago | 0

Answered
normalize a maatrix of 13 columns
You can just use normc() A = randn(1000,13); B = normc(A); If you happen to have the Neural Network Toolbox. ...

13 years ago | 0

Answered
evaluate the variation in the power of a known periodicity
You'll need to use spectrogram() for that. Typically, to get a nice (not blocky looking) output from spectrogram, you overlap yo...

13 years ago | 0

| accepted

Answered
Evaluation of a for loop
Yes, the for loop termination condition is set the first time you enter the loop m = 3; for jj = 1:m disp('Hi'); ...

13 years ago | 0

Answered
how to use FFT in matlab using imported data in time domain excel file
To get the phase, use angle() phi = angle(xdft); To export the frequencies and magnitudes back to Excel, place them in ...

13 years ago | 1

Answered
How to turn a large array into multiple smaller arrays
I think you want to store the separate matrices in a cell array rather than having 759 separate matrices, right? I mean you can ...

13 years ago | 3

Answered
how to use FFT in matlab using imported data in time domain excel file
There is a slight variation depending on whether you have an even or odd number of samples in your data. Even length: x...

13 years ago | 3

Answered
how to use FFT in matlab using imported data in time domain excel file
Import the data into MATLAB using xlsread() Your data will be a Nx2 matrix in MATLAB with the first column the time data and ...

13 years ago | 2

| accepted

Answered
How can plot the following signal?
Then, you just make the adjustments: t = 0:0.0001:0.20; sig = zeros(size(t)); x1 = 230*sin(2*pi*50*t(1:400)); x2 = 230...

13 years ago | 0

| accepted

Answered
Is it possible to make contour graph with log scale colorbar?
Sure just take the log() of the input matrix Z. I'm assuming your data are nonnegative. z = peaks; z = abs(z); con...

13 years ago | 0

| accepted

Answered
When I run the code of area.m it says'Attempt to reference field of non-structure array.'
area.m is a MATLAB function, so you should not name your script area rename your script circarea.m. Then make sure you sav...

13 years ago | 0

Answered
How can plot the following signal?
I think you need to define the signal piecewise. Something like: t = 0:0.001:0.20; sig = zeros(size(t)); x1 = 230*cos...

13 years ago | 0

Answered
msresample error message: 'the point coordinates are not sequenced in strict monotonic order'
Then the problem in your MZ vector is not in the portion that you have shown us, because the above works in R2012a. The issue...

13 years ago | 0

Answered
does a cell vector contains only NaN?
There are many ways: nanarray = cell2mat(cellfun(@isnan,A,'uni',0)); length(nanarray>0) % the above gives yo...

13 years ago | 0

Load more