Answered
Date time conversion problem
The posted code has errors. Try this: A = ['2015-01-01T19:00:00+0100' '2015-01-01T20:00:00+0100']; dates_extracted...

5 years ago | 0

Answered
overlapping two contours and defining specific lines to be compared
See the contour documentation section on levels for details. To plot contours at 18°C, that would plot as: contour(X,Y,Z, [1 ...

5 years ago | 1

| accepted

Answered
Plotting errorbar on a set of data
I do not see ‘B’ anywhere. With ‘A’ as the matrix in the post, try this: Amean = mean(A(:,2:end),2); Astd = std(A(:,2:end)...

5 years ago | 0

Answered
Parameters estimation using lsqcurvefit
I did not see this originally, or I would have responded to it several days ago. The code needed some tweaks (that I will let...

5 years ago | 1

| accepted

Answered
Error using mesh z must be a matrix
The arguments to ‘z’ need to be matrices in order for ‘z’ to be a matrix. Use ndgrid or meshgrid (linked to on that page) to cr...

5 years ago | 1

Answered
How to represent continuous time Transfer function in a script
(1.) Correct! (2.) No.

5 years ago | 1

| accepted

Answered
How to fill plot between two lines
If I understand the objective correctly, this should work: DL = load('data1.mat'); data = DL.data; max=plot(data(:,1),data...

5 years ago | 0

| accepted

Answered
System Identification impulseset function: how do I avoid using deprecated features?
The iddata call contains all the time information the identification functions need in order to estimate the system, in the arra...

5 years ago | 0

| accepted

Answered
Fit log10 function to data and determine the intercept
If ‘b’ is the y-intercept, the easiest way is to interpolate: x = [0.24, 0.6, 1.2, 2.4, 6, 12, 24]; y = [17.2499, 9.8872, 5.6...

5 years ago | 0

Answered
Nth order Butterworth low pass filter design
Since in radian measure the frequency is defined on the interval , and 1 is obviously in that interval, use 1 as ‘Wn’, since tha...

5 years ago | 0

Answered
how to normalize EKG/ ECG signal
See if the rescale function (introduced in R2017b) will do what you want.

5 years ago | 0

Answered
using 'controlchart' and 'findpeaks'
That is going to be something of a challenge, however it is possible. Using an example from the controlchart documentation: ...

5 years ago | 0

| accepted

Answered
2D line graph plotting from calculations
There are too many missing variables for me to run the code, however consider doing something like this: k = 1; ...

5 years ago | 0

Answered
Limits on a line plot
It may simply be necessary to ‘stretch’ the figure. Try something like this: pos = get(gcf, 'Position'); set(gcf, 'Positio...

5 years ago | 0

| accepted

Answered
Remove rows from table identified in a second string array
The ismember function would likely work, however the two tables you want to compare have nothing in common in the variables you ...

5 years ago | 1

| accepted

Answered
amplitude and phase spectrum
No idea what the sampling frequency is, so I created one. Try this: Fs = 600; t = linspace(0, Fs*10, Fs*10)/Fs; x=8*cos(3...

5 years ago | 1

| accepted

Answered
High Pass Filter Error
The problem may be with ‘u_G_Interp’, and since we do not have it to work with, we cannot determine that. Assuming it is a do...

5 years ago | 0

Answered
Add data on matlab graphs
Use a text object, or put it in the appropriate axis label: t = 0:0.1:15*pi; x = exp(-0.05*t).*cos(t); y = exp(-0.05*t).*sin...

5 years ago | 1

| accepted

Answered
Cannot find solution with dsolve but I know that a relatively simple solution does exist
The dsolve function apparently does not integrate nonlinear differential equations. This is likely the best you can hope for:...

5 years ago | 0

Answered
Trying to solve a differential equation
Add ‘Fmag’ to the syms declaration to get — .

5 years ago | 0

| accepted

Answered
Interpolating between end points in polar coordinates
Try this: polcords = [13.7807 208.5120 13.9924 225.4886 19.3740 232.1227 14.2353 26...

5 years ago | 1

Answered
Transfer function fit estimate
I’m not certain exactly what you’re plotting. I always use the compare function to see how closely the estimated system matches...

5 years ago | 0

| accepted

Answered
To define the frequency range when we use FFT
First, change ‘t’ to: t=linspace(0, 300, 600); % Needs To Be Regularly-Spaced then for a t...

5 years ago | 0

| accepted

Answered
Stack three area plots - MATLAB
This approaches what you want, however there must be some sort of conservation metric or other sort of scaling necessary to get ...

5 years ago | 0

| accepted

Answered
how can i fix this error
I have no idea if ‘x’ is a variable or a function, so I am assuming that it is a variable here. The correct expression would ...

5 years ago | 0

Answered
Nonlinear fval, fsolve
Pass ‘A’-‘D’ to ‘mufun’ as extra arguments: function F = mufun(x,A,B,C,D) F = [(1./A)*(x(1)-x(2))-x(3); (-1./A)*(x(1)-x(...

5 years ago | 0

Answered
Please change this code from inline to function.
This is straightforward — f1=inline('2*x.^3+y.^3+x.*y-6'); f2=inline('x.^3-y.^3+x.*y-4;'); magickally becomes — f1 = @(x,y...

5 years ago | 0

| accepted

Answered
interp1 question for resampling
To prevent the NaN results from being part of the interp1 output, specify an interpolation method and use the 'extrap' argument....

5 years ago | 1

| accepted

Answered
plotting line graph in different colors using while loop
This is relatively straightforward to do with scatter, however plot will not work with it. colrfcn = @(x) (x(:)<2.65).*[0 1 0...

5 years ago | 0

| accepted

Answered
How do I plot a 144000 sample sound file with 400 samples in different windows with for loop?
If ‘y’ is the signal, and you have the Signal Processing Toolbox, use the buffer function: framelen = 400; frames = buffer(y,...

5 years ago | 0

Load more