Answered
How to clean this noisy ECG with movement artifact
Unforutnately, that is broadband, relatively high-amplitude noise that completely obscures the underlying EKG signal in that par...

5 years ago | 1

| accepted

Answered
Problem on numerical solution of y'=y^2+1
Try this instead, since the differential equaiton has an analytic solution — syms t y(t) de = diff(y) == y^2+1 yfcn = dso...

5 years ago | 0

Answered
Display intersection of two arrays
It would help to have the data. Synthesising some, this illustrates a straightforward approach — A = [(0:7053).' (0:7053)....

5 years ago | 0

| accepted

Answered
Want to remove a line in my plot
A = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/835480/A.txt'); A = A(:,[2 3]); B = readmat...

5 years ago | 0

| accepted

Answered
plotting a surface between 2D curves
One option is a patch object for this and another is surf — figure(2) x = linspace(28,224); y1 = repelem(1,100); y2 =repelem...

5 years ago | 1

| accepted

Answered
why bandwidth returns an "inf"?
It returns Inf because the bandwidth function requires a monotonically-decreasing signal, not one with a passband. Try this —...

5 years ago | 0

| accepted

Answered
creation of toeplitz matrix
It would help to see the code, since I have no idea what ‘r’ is. That aside, try something like this — cell_matrix = {rand(...

5 years ago | 0

Answered
How do I extract an entire 3D graph from MATLAB?
I’m not exactly certain what the desired result is, however in a surf plot for example, the surface object hass the information ...

5 years ago | 0

Answered
sym/solve: input order relevant for solution success?
Use the simplify function first, and both sork — syms a b gamma omega real positive syms C psi real assumeAlso(C > 0); as...

5 years ago | 0

| accepted

Answered
How to find FIR approximation of an IIR function?
If it is possible to calculalte (and ideally plot) the magnitude response as a function of frequency, use the firls funciton to ...

5 years ago | 1

Answered
Plot time series in date format from Excel sheet
There is nothing wrong with the dates. Try something like this — T1 = readtable('https://www.mathworks.com/matlabcentral/an...

5 years ago | 1

| accepted

Answered
Why doesn't 'find' function work properly?
Include a tolerance: wavelength = 0.35 : 0.001 : 0.8; idx{1} = find(abs(wavelength-0.6)<0.0001); idx{2} = find(abs(wavelengt...

5 years ago | 0

| accepted

Answered
Numerically solving a pair of coupled second order ODES with odeToVectorField
‘... the code I am trying to does not work for a pair of ODEs.’ Yes, it does. Look at the ‘Subs’ result from odeToVectorFiel...

5 years ago | 0

| accepted

Answered
Multiple histograms and how to measure fwhm?
Try this — M1 = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/833435/1to10_30s_15mm_diff_pivoted....

5 years ago | 0

| accepted

Answered
How to shade several areas in a plot?
Try this — x = 210:0.5:227; y = randn(size(x)); bands = [214 216; 221 223]; ...

5 years ago | 1

| accepted

Answered
converting a date into a num
I have no idea what those date numbers are, since they are not MATLAB date numbers, and attempting to convert them as 'excel' or...

5 years ago | 0

Answered
Coupled Mass and energy equations using bvp4c
Ths usual solution for that is to simply increase the initial mesh size, and here that is: z = linspace(0,1,7500); It then ru...

5 years ago | 1

| accepted

Answered
How to create a frequency domain bandstop filter?
Use the fftfilt function, and the FIR filter that produces the desired result. A suitable, simple notch filter — Fs = 5000;...

5 years ago | 0

| accepted

Answered
How to list specific variable at all points except at certain values
I have no idea what the actual application is. One option: outpt = @(trial) ((trial >= 0) & (trial <= 4)).*5 + ((trial < 0)...

5 years ago | 0

Answered
How can I get the transfer function for the three filters in this code? and how to plot the magnitude spectrum for the filters transfer function?
The numerator of the transfer functions are the outputs of the fir1 calls (and the denominator is always 1). For the first fi...

5 years ago | 0

Answered
Horizontal line up to graph line
Try this — y = [0.5 1 2 3.5 6 8 10.2 14 18 21 35 41 58 60.5 66 70 90 100]; y1 = [0 0.5 1 2 3.5 6 8 10.2 14 18 21 35 37.32...

5 years ago | 1

| accepted

Answered
Extracting the specific range of data.
I have no idea what the signal looks like. It is apparently recorded rather than being processed in real time. To detect the...

5 years ago | 0

Answered
How to add regression line equation to a plot?
One approach — y = [4.0432,4.1073,4.0899,4.1319,4.2885,4.4305,4.5249,4.6172,4.6962,4.7235,4.5987,4.7927,4.895,4.9079]; x = [1...

5 years ago | 1

| accepted

Answered
How to separate Variables Names from the Data in Two Different table
Perhaps something like this — T1 = array2table(randi(99, 10, 5)) T2 = T1; T2.Properties.VariableNames = {'Alpha','Beta','G...

5 years ago | 0

| accepted

Answered
Plotting Signals in matlab
One option is to use the Symbolic Math Toolbox and go from there. Example — syms t u(t) = heaviside(t); X(t)=(t+1)*u(t-1...

5 years ago | 0

| accepted

Answered
Split vector to sub vectors of equal size
If the sampling times are uniform (constant sampling intervals between the observations) use the Signal Processing Toolbox buffe...

5 years ago | 0

Answered
Average data of 5 samples with different array length (tensile test dogbone)
They don’t all share the same ‘strain’ values, so it is only possible to compare them over the ‘strain’ values they share. Cho...

5 years ago | 0

| accepted

Answered
How can I add zeros to a vector to make a continuous time axis from a discontinuous one?
I‘m not certain what data are in the table, however the first column appears to be the length of the recordings. There do not a...

5 years ago | 0

Answered
Xticklabel to split into two lines
See: How do I create a multi-line tick label for a figure using MATLAB 7.10 (R2010a)? - This has been updated to work in more ...

5 years ago | 1

| accepted

Load more