Answered
How to adjust legend
I am not certain what you want, however the approach in Specify Legend Labels During Plotting Commands (using the 'DisplayName' ...

5 years ago | 0

Answered
Having trouble to calculate the area under curve for each peaks and display the area under curve in graph?
It depends entirely on what the definition of ‘peak’ is, and if the data first need to be detrended. T1 = readtable('https:...

5 years ago | 0

| accepted

Answered
Matlab shows symbolic result with new variabels
The approach in Abbreviate Common Terms in Long Expressions might do what you want. .

5 years ago | 1

| accepted

Answered
How to filter a signal?
First, the data are really noisy, and exhibit broadband noise that will be impossible to eliminate with a frequency-selective fi...

5 years ago | 0

| accepted

Answered
How to plot a vertical line at f(x)=0.5
Use the xline and either the patch or fill functions: xv = 0.5; yv = 0.5; figure hold on xline(xv) yline(yv) patch([[0 x...

5 years ago | 0

| accepted

Answered
Get one best curve (graph) from 5 sets of curve.
The plotted data all appear to have a zero intercept, so to get one slope for all of them, this works: Set1 = [0:0.1:0.6; (0:0...

5 years ago | 0

Answered
Why do I get NaN?
There is one NaN value in ‘giuliayearlyDELTA2.Height’. However, the str2double call is not necesary. Just do: D = giulia...

5 years ago | 0

| accepted

Answered
Why isn't my graph plotting?
That is because using matrix right division (/) it is plotting onlly one point, and while this would work if it also plots marke...

5 years ago | 1

| accepted

Answered
Complex roots of sin(2*x)-2*x=0
Providing fsolve with a complex initial estimate encourages it to find complex roots — f = @(x) sin(2*x)-2*x; xrts = fsolve(f...

5 years ago | 0

| accepted

Answered
Error when ploting discrete time function
Use element-wise multiplication (.*) instead of matrix multiplication (*). Try this — xn = @(n)[(n==-3),(n==-2),(n==-1),(n=...

5 years ago | 1

| accepted

Answered
rlocus throws up error
Something else is wrong somewhere. I have no idea as to suggesting where to look for the problem. The example code works her...

5 years ago | 0

| accepted

Answered
How can I calculate the area under each peak / display the AUC on the graph?
I decided to give this another try, this time avoiding numerical integration (since it is very difficult to define the pulses), ...

5 years ago | 0

| accepted

Answered
I need some help with Curve Fitting
‘I sware this is not homework. I guess It does sound like homework. Im sorry. Im just trying to get some help.’ O.K. I’ll take...

5 years ago | 0

| accepted

Answered
Curve fitting with loglog data
Fit it to a power function: LD = load('msd_help.mat'); m = LD.m; s = LD.s; fcn = @(b,x) x.^b(1).*exp(b(2)); B = fminsear...

5 years ago | 0

| accepted

Answered
Create a timetable for every minute in one day
Without a date, it creates a duration array, not a datetime array. The two are different, especially with respect to 'Format' o...

5 years ago | 0

Answered
Hide peaks ticks and number on plots
There is likely no way to select only those peaks, since there does not appear to be anything that distinguishes them, unless th...

5 years ago | 1

Answered
I get a Warning from scatteredInterpolant.
‘Should I be concerned about this warning?’ Probably not, unless the result of the interpolation does not correspond the the ...

5 years ago | 0

Answered
Confuction with cutoff frequency
The first red line (at 0.357) corresponds to the low cutoff frequency. The upper cutoff frequency should be at 2.856, so the se...

5 years ago | 0

| accepted

Answered
Insert column of strings into numerical matrix
Use a table array instead of a matrix. .

5 years ago | 0

Answered
Plot multiple curves with filled markers
One approach — x = linspace(0,10); v = 1:5; y = v(:)+sin(2*pi*v(:)*x); cm = colormap(jet(size(y,1))); figure hold on f...

5 years ago | 0

| accepted

Answered
Is this the correct way to use "hold on" in a for loop?
‘Is this the correct way to use "hold on" in a for loop?’ That is not the way I would do it. Try this instead: figure h...

5 years ago | 0

Answered
Find coordinates of border in findpeaks plot
Using an example from the findpeaks documentation — x = linspace(0,1,1000); Pos = [1 2 3 5 7 8]/10; Hgt = [4 4 2 2 2 3]; ...

5 years ago | 1

| accepted

Answered
Convert Time Given in Seconds to Minute, Seconds, Milliseconds
This is simply a straightforward format change: t = seconds(183.55) t.Format = 'hh:mm:ss.SSS' producing the desired result. ...

5 years ago | 2

Answered
Error finding Linear Regression with polyfit and \
There is a NaN value in the temperature data. Try this: LD = load('data.mat'); data = LD.data; x = data.LOCAL_DATE; xd...

5 years ago | 0

| accepted

Answered
How to find tangent line of curve
See: How to draw a tangent line on a curve .

5 years ago | 0

Answered
plot 2D matrix data
The pcolor function requires a matrix argument, and the data provided here are a (5000 x 3) matrix with ‘X’, ‘Y’ and ‘Z’ columns...

5 years ago | 0

| accepted

Answered
How can I differentiate an abstract symbolic function?
I am not certrain that I understand what you want to do. See if the diff documentation section on Differentiation With Respec...

5 years ago | 0

Answered
I want to find the value of two constants from an equation with two variables
@NDC — To estimate the initial parameters for this, since is known, the asymptote as will be , and that gives a way to estim...

5 years ago | 0

| accepted

Answered
Why do I receive "Error using lsqcurvefit (line 251) Function value and YDATA sizes are not equal."
Do element-wise division F2 = @(x,xdata)(x(1)*sin(xdata*pi/180)*(1-exp(-50*x(2)))./(1-cos(xdata*pi/180)*exp(-50*x(2)))); ...

5 years ago | 0

| accepted

Answered
Cells detect and Cells numers in array
M1 = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/701747/1.xlsx') time_desired = [0, 10, 60, ...

5 years ago | 0

| accepted

Load more