Answered
Hi guys, I am new to MATLAB and the field of signal processing. I have some ECG sample data received at a frequency of 384 Hz. How do I reduce the frequency to 50-80 Hz without much loss?
*DO NOT RESAMPLE AN EKG TO ANY SAMPLING FREQUENCY LOWER THAN 200 Hz!* The bandwidth of a normal EKG is between *|0|* and *|...

8 years ago | 0

Answered
How to export my Matlab date to Excel in a matrix of 1x3 (x,y,z) of top and bottom?
A relatively straightforward way is to first create a table from your vectors: top = [143,200,4]; bottom = [188,250,2];...

8 years ago | 0

Answered
What are the extra frequency components in the frequency magnitude plots of my .wav file?
You are calculating and plotting a two-sided Fourier transform. See the documentation on <https://www.mathworks.com/help/re...

8 years ago | 0

Answered
Least squares Exponential fit using polyfit
Since you are starting with: y = a * exp(b * t) and linearising it yields: log(y) = log(a) + b*t however *|‘aP...

8 years ago | 3

| accepted

Answered
what is meaning of this plzz tell me
Those assignments set the *|‘feat’|* and *|‘class’|* variables to empty arrays *|[]|*. Note that <https://www.mathworks.co...

8 years ago | 0

| accepted

Answered
In this code plot(t,AC(3,:),'-r',t,AC(2,:),'-g',t,AC(1,:),'-b'); what is the value/essence of the '-r', '-g' and '-b'?
The *|‘-r’|*, *|‘-g’|*, and *|‘-b’|* tell the *|plot|* function you are using to plot *|‘t,AC(​3,:)’|* with a red solid line, *|...

8 years ago | 0

| accepted

Answered
Fit two equations simultaneously to obtain fitting parameters. Is it possible to do it with Curve fitting toolbox?
I do not have the Curve Fitting Toolbox. It is possible to use the *|fminsearch|* function: a = rand; yfcn = @(b, ...

8 years ago | 2

| accepted

Answered
Proleblem with empty plot
You forgot to vectorise the division in the *|‘IC’|* calculation: IC=(IPCC.*(Znsprevod+Ztr))./Zc ...

8 years ago | 0

| accepted

Answered
How to plot my own value +degree, using rose or polar histogram ?
See: <https://www.mathworks.com/matlabcentral/answers/184607-rose-diagram-for-discrete-data *Rose diagram for discrete data*> (l...

8 years ago | 0

| accepted

Answered
how to make laplace transform of sine wave
If you are using the Symbolic Math Toolbox, use the <https://www.mathworks.com/help/symbolic/laplace.html *|laplace|*> (link) fu...

8 years ago | 0

Answered
The if loop works fine but elseif breaks without reason.
I would first experiment with changing this: if(value>E>value+0.0005) to either: if(value>E | E>value+0.0005) o...

8 years ago | 1

| accepted

Answered
EEG dataset analysis in frequency domain
You have to calculate the *|fft|* of each channel separately. The analysis you do obviously depends on what you are studyin...

8 years ago | 0

Answered
How to use FFT on my data?
Other peaks may exist, although if the constant, (or ‘d-c’) offset is large enough, you will not be able to see them. Try t...

8 years ago | 0

| accepted

Answered
Evolutionary algorithm for a spreadsheet
Use the Global Optimization Toolbox <https://www.mathworks.com/help/gads/ga.html *|ga|*> (link) function. It implements a robus...

8 years ago | 1

Answered
How do I separate data into different columns from a text file?
I am not certain what you want. This version copies column *|1|* to *|(498x2)|* matrices for each column, in case you need ...

8 years ago | 0

Answered
System of equations coding problems
See the documentation on <https://www.mathworks.com/help/matlab/ref/mldivide.html *|mldivide,\|*> (link).

8 years ago | 0

Answered
Efficient way to compute an integral within another integral
Creating an anonymous function to calculate the normal PDF functions resulted in an average speed increase of about *|3.6|* over...

8 years ago | 1

| accepted

Answered
Help with Understanding and Fixing Contour Plot
I am not certain what you’re doing, or the result you want. This sets the elements of *|‘T2d’|* that are equal to *|1|*, to...

8 years ago | 0

| accepted

Answered
"the function return value 'self inductance' might be unset"
Perhaps you intend: Selfinductance = m*n; or to return *|‘L’|* as the output.

8 years ago | 0

| accepted

Answered
How to calculate time elapsed for AM and PM
You should add dates to each time, and delete the *|‘AM’|* and *|‘PM’|* since you are also using *|24|*-hour times. Try thi...

8 years ago | 0

Answered
Genetic algorithm (GA) calculated values compared to measured
It is difficult for me to understand what you are doing, and I do not understand your code. If your fitting parameters (the...

8 years ago | 0

| accepted

Answered
How to calculate the area between two curves + optimization.
One approach: x = linspace(50, 150); % Create Data y = 0.5 + 0.5*tanh(0.1*(x - 98)); ...

8 years ago | 0

Answered
Plotting a second order system using ode45()
I believe *|‘dydt(1)’|* should simply be: dydt(1) = y(2); instead of multiplying it by *|‘m’|*.

8 years ago | 1

| accepted

Answered
why doesn't this ODE45 function work?
The easy solution is to create *|‘SIRmodel’|* as an _anonymous function_. This works: SIRmodel = @(t,x) [-2*x(1)*x(2)...

8 years ago | 0

| accepted

Answered
how to calculate mean,5 percentile of first quartile q5, 50 percentile of second quartile q50 and 95 percentile of third quartile q95
For the quantiles, use the Statistics and Machine Learning Toolbox <https://www.mathworks.com/help/stats/quantile.html *|quantil...

8 years ago | 0

Answered
How would I find the 90th percentile of a vector, factoring in frequency?
I would do this the same way as the calculation of the median earlier. Changing *|0.5|* to *|0.9|* in the *|find|* call is all ...

8 years ago | 1

| accepted

Answered
plotting non-linear equation
There is, _if_ you have the Symbolic Math Toolbox: syms x y Eqn = y*x == 1 + log(y/x); y = solve(Eqn, y); fi...

8 years ago | 0

Answered
Symbolic integration inside numerical integration
See if this does what you want: firstint = @(r) integral(@(x) 1./(1+x.^2.5), r, Inf, 'ArrayValued',1); secondint = @(r)...

8 years ago | 0

| accepted

Answered
How do I move my origin of my base of my cylinder from (0,0) to a another origin for example, (2,2). Below is my code for a cylinder which has radius 1 and base cylinder origin (0,0) Thank you in advance.
Try this: [x,y,z] = cylinder(1); xshift = bsxfun(@plus, x, [2;2]); yshift = bsxfun(@plus, y, [2;2]); figu...

8 years ago | 1

| accepted

Answered
How can I work out the median of frequency tables?
I would use the frequency vector *|‘B’|*, since it has the information you need. Try this: A = sort(rand(1, 35)); ...

8 years ago | 1

| accepted

Load more