Answered
How to find duration of peaks/valleys in chart
Try this — T1 = readtable('NV1-9999.csv', 'VariableNamingRule','preserve') VN = T1.Properties.VariableNames; x = T1{:,1}; ...

2 years ago | 1

Answered
What is the function to use to blacken a region?
Perhaps this — % clear %% Plotting the graphs % We have p(x) = 16 => p(x) - 16 = 0 f = @(x) (800000 .* exp(-x./5000)) ./ (x...

2 years ago | 0

Answered
why is this not outputting the correct values
There is a syntax error, in that you used a colon operator ‘:’ instead of a comma in the ‘pythtrips’ references. The syntax is ...

2 years ago | 0

| accepted

Answered
Creating an equation with 2 unknowns with Curve Fitting
The question is a bit ambiguous. I do not see where curve fitting (actually parameter estimation) enters into it, because I do ...

2 years ago | 0

| accepted

Answered
Como resolver esta ecuacion
Is there a problem? This works — % Parámetros del sistema m = 45; % masa c = 64; % coeficiente de amortiguamiento k =...

2 years ago | 0

Answered
save a figure in a predefined folder as variable using print
Using the fullfile function may help. You have to supply the necessary information, however fullfile will build the path.

2 years ago | 0

| accepted

Answered
How to plot specified data points on a polar plot with curved lines, instead of straight lines
I am not certain what result you want. The plot image you posted looks like a sort of spline fit, however when I tried a spline...

2 years ago | 0

Answered
Sorting pairs into seperate matrices based on whether they are ascending or descending
The loop is not necessary anyway. Just use ‘logical indexing’ — pairs = [2 8 7 5 6 8 4 7 ...

2 years ago | 0

| accepted

Answered
I have line and want to colour the area behind the line (beyond the x axis) how can I do this
I am not completely certain what ‘behind’ the line means, however from your comments with respect to the x-axis, I guess that yo...

2 years ago | 0

Answered
Fit experimental data to analytical expression
Equation (3) is a bit mystifying to me. imshow(imread('analytical_expr.png')) imshow(imread('phase_vel.png')) I assume th...

2 years ago | 0

| accepted

Answered
Convert a datetime to string
I am not certain what the problem is. To convert [2022 07 17] to your desired format using datetime, try this — DT = dateti...

2 years ago | 0

| accepted

Answered
unexpected discontinuity in graphic
My guess is that the filter is unstable. This occurs relatively frequently with transfer function realiations of filters. I ...

2 years ago | 0

| accepted

Answered
exponential regression functions with error in input values
There are other options, however everyone hass fminsearch, so using it — x = [4; 25; 100]; y = [100; 50; 0]; % objfcn = @...

2 years ago | 0

Answered
3D surface plot from only scalars
The only difference appears to be that whatever produced the plots in the posted image is using much higher precision and differ...

2 years ago | 0

Answered
Question about a way variable appears
Functions have their own workspaces. Variables internal to a function will not appear in the ‘Workspace’ window because it only...

2 years ago | 0

Answered
Decoding geiger counter signal
If you want to divide the signal into non-overlapping segments and then analyse each segment, use the buffer function. That w...

2 years ago | 0

| accepted

Answered
How can I simplify this expression using "abs" function?
This seems to work — syms n k Expr = 7/6 * symsum((2*n^3 + 3*n^2 + n - 2*k^3 - 3*k^3 - k)-(k*(k+1)*(2*k+1))/6, k, 1, n-1) E...

2 years ago | 0

Answered
indexing error in function code
The initial subscript problem was the result of: y0=0; because there are 12 differential equations. There are several typogr...

2 years ago | 0

| accepted

Answered
Why my - tf2sym - command is not working?
If you want to conovert that transfer function to a symbolic variable, try this — Gs=tf(1,[1 10 27 18]); Gss= tf2sym(Gs) w...

2 years ago | 0

Answered
Running example "Create Site Viewer" does not work in Matlab R2023b
Apparently, in the interest of reducing the increasing storage demands of the more recent MATLAB releases, MathWorks has stopped...

2 years ago | 0

Answered
Can you answer why am I getting this error. What should Ido? The error says 'Unrecognised variable z'.
The first if block condition is not being satisfied, so ‘z’ is not defined. The reason is easy to see, since any absolute va...

2 years ago | 0

Answered
How do I find the specific X-coordinates where y is equal to a specific value?
We do not have your data, however what you want to do is straightforward. Try this — freq = linspace(0, 10); y = mag2db(no...

2 years ago | 1

| accepted

Answered
How can I just change the color of the bottom x-axis of a figure?
If you just want to change the axis colour, try something like this — Ax1 = axes; Ax2 = axes; Ax2.XAxisLocation = 'top'; Ax...

2 years ago | 0

Answered
Revolve a Plot around y axis to generate a 3D plot
The easiest way to do this is to start with the sphere function and then scale it. Try this — theta =linspace(-pi/2,pi/2,10...

2 years ago | 0

Answered
How to only change the sign without altering the font?
When I copy the sign from Windows Character Map and then explore it, your approach seems to work — figure plot([-10:-1]); % ...

2 years ago | 0

Answered
How to find phase and frequency spectrum of signal?
A one-sided fft — t = -2:0.01:2; x = zeros(size(t)); x(t >= -2 & t < -1) = -1; x(t >= 0 & t <= 2) = -1; figure plot(t, ...

2 years ago | 0

Answered
Daily and monthly moving averages
Use a timetable rather than a dataset. Then use the retime function.

2 years ago | 0

Answered
Keep getting ERROR: Array indices must be positive integers or logical values for X(t)
Create ‘X’ as an anonymous function: X = @(t,C,Wd,Phase_Angle) (C.*exp(1).^-del.*Wn.*t).*cos ((Wd.*t)-Phase_Angle) % equation ...

2 years ago | 0

Answered
In the case of a previously filtered signal, what methods can be employed to identify its filter characteristics?
If you have the original signal as well (before filtering), you can approximate the filter transfer function by taking the Fouri...

2 years ago | 1

| accepted

Answered
Finding the slope after drawing a trend/linear fit
Alternatively — files = dir('*.xlsx'); T1 = readtable(files.name) VN = T1.Properties.VariableNames; T = T1.T; x = T1.x; ...

2 years ago | 0

| accepted

Load more