Answered
How to remove minor oscillations?
I am not certain if the objective is to eliminate the minor oscillations or simply eliminate finding them. To eliminate them ...

4 years ago | 0

| accepted

Answered
How can I generate the energy vector?
If you want to segment it into 20-sample subvectors and then get the sum of each subvector, use the buffer function — VV = abs...

4 years ago | 0

Answered
error using etime (datevec)
If R2014b or later is available, try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/896...

4 years ago | 0

Answered
Findpeaks with multiple columns
I am not certain what the data are, and without the data an appropriate solution is not possible. However, there are two obse...

4 years ago | 0

Answered
Adding datetime to spectrogram x axis
The spectrogram function uses surf to create its plots. In R2021b it accepts datetime values for the axis coordinates (see the ...

4 years ago | 0

| accepted

Answered
How to run batch of peak finding on data?
data = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/895415/exampledata.txt') [pks,locs,wdt,...

4 years ago | 0

| accepted

Answered
How to differentiate vectors
Use the gradient function — lambda = linspace(0.5,2.5); n = [1.55155531233953 1.54949576778463 1.54767969992980 1.546069410...

4 years ago | 0

| accepted

Answered
Coupled ODE dsolve Problem
The original dsolve call output was throwing the error. However the problem is that the system is nonlinear, and as the resul...

4 years ago | 0

Answered
interpolating data to different sample rate
If they are signals, use resample because it includes an anti-aliasing filter, and these appear to be signals. format longE ...

4 years ago | 0

Answered
want to make timetable
Use the table2timetable function.

4 years ago | 1

| accepted

Answered
How to add a first row and a first column of zeros in a matrix?
The easiest way is to create an appropriate zeros matrix and just index into it — A=[1 2 3; 4 5 6; 7 8 9]; B = zeros(size(A,1...

4 years ago | 1

Answered
exp function varios atb
The loop is not necessary. Use vector-matrix multiplication instead. Try this — clear all D=[0,0]; % D - dráha (m),...

4 years ago | 0

| accepted

Answered
How to plot the area between the 2 curves with transparency 50% ?
y = [0;2;4;8;12;15;19;21;23;26;29;32;36;40;43;45]; h=[-0.4270; -0.3210;-0.3600;-0.2967;-0.1400;-0.0876;-0.2430;-0.4170;-0.9...

4 years ago | 0

| accepted

Answered
What matlab products i need as a biomedical engineer?
It depends what you are doing, since Biomedical Engineering covers a wide range of disciplines. My interest is in signal proces...

4 years ago | 0

Answered
How to plot magnitude and phase of a Fourier Transform
Convert ‘X’ into an anonymous function, the evaluate it in the plot calls — w = [-4:0.1:4]; X = @(w) 1./(0.6+(1i.*w)); fig...

4 years ago | 1

| accepted

Answered
How to filter noise from the following time series data?
The noise is broadband, so any frequency-selective filter will not work to eliminate the noise. The best options are either w...

4 years ago | 0

| accepted

Answered
Indexing a timetable using time
One option may be findgroups — DateTime = (datetime('2022-02-12') : minutes(30) : datetime('2022-02-18')).'; Universo_MidPric...

4 years ago | 0

| accepted

Answered
Solve an equation not getting a result
The solve call was causing problems because the conversion and testing in the if block would then not work correctly because the...

4 years ago | 0

Answered
Plotting Reflection Coefficient as a function of frequency
I am not familiar with these equations. However, calculating the deicbel conversion only on the real part of ‘reflection_coeff’...

4 years ago | 1

Answered
why is the zpk function not producing the transfer function in MATLAB?
Remove the closing parentheses in the ‘G’ assignment to see the result as a sort of ‘prettyprint’ output: a = [2,5,9,5,3]; b ...

5 years ago | 0

| accepted

Answered
How to calculate p value after using fminsearch
Using fminsearch it will be necessary to create your own covariance matrix (for the confidence interval calculations) and analys...

5 years ago | 0

| accepted

Answered
MATLAB cannot plot LinearModel: "Unable to perform assignment because dot indexing is not supported for variables of this type."
I have no idea what the rest of your code looks like, however I have no problem plotting it: This code: LD = load('alpha_App...

5 years ago | 0

| accepted

Answered
How can I write and solve this equation? as a function??
Possibly, after first providing values for the constants: T(z,z0,Tz0,Tinf) = Tinf - (Tinf - Tz0).*exp(z-z0); % Fu...

5 years ago | 0

| accepted

Answered
Error: Operator '-' is not supported for operands of type 'function_handle'.
To be used in calculations, functions must be evaluated, and that means providing them with an argument. See if this provides...

5 years ago | 1

| accepted

Answered
Calculate duration of Peaks using findpeaks function
Try something like this — t = linspace(0, 24*30-1, 2*30); % Simulate Time wv = 2 + sin(2*pi...

5 years ago | 0

| accepted

Answered
how to take monthly mean of hourly data set ?
The groupsummary function could be helpful here. See Grouped Calculations in Tables and Timetables for a detailed discussion. ...

5 years ago | 0

Answered
Interpolated phase data will not unwrap
The arguments to the interp1 call are incorrect. The first two should be reversed, since the interpolation is over frequency. ...

5 years ago | 0

| accepted

Answered
Problem with saving a Matlab file
Always supply the .mat extension yourself. MATLAB has no way of knowing otherwise, and assumes that what you assume is a file n...

5 years ago | 0

Answered
Find the minimum of a function on a plot and where it occurs on the x-axis
If the plot is of data and not of funciton evaluations, the min function could be useful.

5 years ago | 1

Answered
How to create a closed surface cylinder using patch function?
Try this — %% Cylinder [l,m,n]=cylinder; figure() surf(l,m,n) hold on patch(l(1,:),m(1,:),n(1,:),'r') patch(l(2,:),m(2...

5 years ago | 1

| accepted

Load more