Answered
IIR butter filter is not stable
Use second-order-section representation for stability and filtfilt to do the actual filtering — [X,Fs] = audioread(filename); ...

4 years ago | 1

| accepted

Answered
How to add gain to an audio signal?
Try this — Fs = 44100; t = linspace(0, Fs-1, Fs)/Fs; s1 = sin(2*pi*t*15); dB30 = db2mag(30) s2 = s1*dB30; figure plot(...

4 years ago | 0

| accepted

Answered
Impulse response function (IRF) of data set
I’m not certain if it’s possible to define the impulse response of an electromyogram, however I have no idea what your data are....

4 years ago | 1

Answered
How to smooth contour lines for the given set of data
Increase the resolution of the vectors (and resulting matrices), and optionally define the 'method' as something other than 'lin...

4 years ago | 0

| accepted

Answered
How to mesh plot sum of sine waves
Give it the ‘X’ and ‘Y’ matrix arguments rather than the vector arguments — x=-1:0.01:1; y=-1:0.01:1; [X,Y]=meshgrid(x,y); ...

4 years ago | 0

| accepted

Answered
smoothing a graph using matlab
There are several opotions, including sgolayfilt and smoothdata and frequency-selective filters — y = readmatrix('https://www....

4 years ago | 0

| accepted

Answered
How would I use fsolve for 3 unknowns and 3 equations?
Provide values for ‘Qt’ and ‘Qm’ and then solve it — clear;clc;format long; lm1=0; %m lm2=-0.2; %m Am=95; %m^2 At=3; %m^...

4 years ago | 2

| accepted

Answered
Wilcoxon 'signrank' test zval is not calculating
The ‘zval’ is only returned when the 'method' is 'approximate'. There is no statistical difference between the vectors: [p,...

4 years ago | 0

| accepted

Answered
How do I put the patch in the correct position?
It appears that the ‘x’ and ‘y’ axes are reversed with respect to the data and the percentile patches. Keep the percentile patc...

4 years ago | 0

| accepted

Answered
Identify Zerocrossing Indices near to the peak of the other signal matlab
The file is too large to download here, and the online Run feature still has problems with .mat files. That aside, finding th...

4 years ago | 0

| accepted

Answered
Internal Matlab function not found (isnan)
Try — rehash toolboxcache .

4 years ago | 1

Answered
Convert from transfer function to time domain
Probably the easiest way is to just simulate it. R0=0.000605797; Qr=147964.8608; R1=0.000856205; C1=0.049823238; % X=[SOC...

4 years ago | 1

| accepted

Answered
combining 2 ECG signal into 1
Unless the row vectors ‘xn’ and ‘xaf’ have the same number of elements, the vertical concatenation to produce ‘xc’ is going to f...

4 years ago | 0

| accepted

Answered
Choosing the Axis for Interp2?
Use plot3 instread of plot, since the plot is in three dimensions — X=-1:0.1:1; Y=-1:0.1:1; Z=membrane(1,10,10); figure(1...

4 years ago | 0

| accepted

Answered
how to make a cross section of lines and connect cross sections?
I do not have your data, however consider something like this — It would appear that the ‘y’ value is fixed in any specific lo...

4 years ago | 0

| accepted

Answered
Proper Labeling of X & Y values Contour Plot
Use the tick label properties to change the tick labels. Any new tick values have to be in the ranges of the current tick value...

4 years ago | 0

| accepted

Answered
how to make a boundary using percentile?
This uses the prctile function — x = rand(1,1000)*10+125; y = randn(1,1000)*50+250; xpctl = prctile(x,[2.5 97.5]) ypctl ...

4 years ago | 0

| accepted

Answered
Is there a function to make a long list of a single value?
Try this — Fives = 5*ones(400,1) .

4 years ago | 1

| accepted

Answered
Understanding this FFT Graph
‘My question is; what would the label be for the Y-axis and secondly, is the X axis just frequency in the time domain?’ The Y...

4 years ago | 0

| accepted

Answered
FFT Analysis of Sine Sweep
Your posted code is likely as good as it is possible to get. I added a pspectrum call at the end — T=5; %size of window fs...

4 years ago | 0

| accepted

Answered
Reading complicated CSV file
Try something like this — C1 = readcell('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1007390/random.csv'); ...

4 years ago | 1

| accepted

Answered
How to solve a nonlinear system with 6 equations but with only 4 variables?
Use the mldivide, \ operator to do a least-squares determineation of the system. See the documentation for details. .

4 years ago | 0

Answered
Problem with cycle within a cycle output
If I understand correctly what you want to do, in every ‘j’ iteration, ‘h’ needs to be reinitialised, so: h = 1; whil...

4 years ago | 0

| accepted

Answered
Precise Prediction Model Development
What are you predicting? How does ‘y’ fit in with this? Is it a separate vector? With those concerns met, building the ...

4 years ago | 0

| accepted

Answered
How to filter noise in EMG signal - Tibialis anterior muscles
First, before calculating the fft, subtract the mean of the signal to eliminate the D-C (0 Hz) spike so the other peaks are more...

4 years ago | 0

Answered
How to match the rising starting point of the graph
This is my best effort. I could not get the other functions I tried (ischange, findchangepts, islocalmin, etc.) to work, so I w...

4 years ago | 2

| accepted

Answered
I exported data from excel into a table, how do I sum the values of each column from that table excluding NaN's
Two options — T = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1005700/Inventory.xlsx') S1 = nan...

4 years ago | 0

Answered
How to overcome the problem with the function diff used to approximate matrix derivative.
Use the gradient function instead of diff.

4 years ago | 0

Answered
How to interpolate a column array based on another non-linearly spaced column array?
As a general rule, it is best to interpolate a longer vector to a shorter vector in order to avoid creating data that interpolat...

4 years ago | 0

Answered
Incorrect use of '=' operator for an IF statement
I usually do something like this in setting an index range — L = numel(Componentry_New) for k = 1:Whatever Level_Either_...

4 years ago | 0

Load more