Answered
plot a vertical line on datetime axis of a time series
Perhaps — dt = 1E-2; % Create Data ndp = 1E+4; ...

4 years ago | 1

Answered
design filter to implement in microcontroller
An IIR filter would be more efficient, and an elliptic filter the most efficient of those. The designfilt function may be the e...

4 years ago | 1

| accepted

Answered
How to extract values at particular interval ?
Try something like this — A = randi(9,3,4,48) B = randi([11 19], 1, 48) iv = 1:4:48 ...

4 years ago | 1

| accepted

Answered
How to extract number from this string cell?
Try something like this — C = [") injection-dr0015:138751)" ") injection-dr0015:68761)" ") injection-dr0015:122762...

4 years ago | 1

| accepted

Answered
I get Error using zeros Size inputs must be integers when I change h to be 0.8 or larger. How can I fix that?
I am not certain what you want to do. One option is to divide ‘t’ by ‘h’ — f = @(t,v) (-v*3*t)/(1+t)+2*(1+t)^3*exp(-t); a ...

4 years ago | 0

Answered
Synchronising two different signals
I got this far, however I have no idea what you want to do with them at this point — % clear % close all % datapathECG = %Da...

4 years ago | 0

| accepted

Answered
Solution of a system of ODEs by means of bvp4c
The singlular Jacobian was likely the result of the ‘(1/r)’ term, since ‘r’ initially begins at 0. While changing that removed ...

4 years ago | 0

Answered
How to remove a certain value from all entries of a vector
You can remove the offset and the trend with a highpass (or bandpass) filter. (Use bandpass if you want to elimiinate high-freq...

4 years ago | 0

Answered
Discrete input signal and continuous transfer function
It would likely be best to convert the continuous-time transfer function to a discrete-time transfer function (ideally using the...

4 years ago | 1

| accepted

Answered
Align two plots based on amplitude
Perhaps something like this — t = linspace(0, 10, 1000); y1 = sin(2*pi*t/2.5) + randn(size(t))*0.1; y2 = 1.5*sin(2*pi*t/2.5)...

4 years ago | 0

| accepted

Answered
Finding Unknown Parameters from Monod Equations
The estimated value for ‘theta(1)’ definitely does not appear to be as expected for a rate constant, however if it is than it ...

4 years ago | 0

| accepted

Answered
How do I implement a genetic algorithm for parameter fitting to an already existing ODE system>
Here is some prototype code I developed a while ago that you can adapt to your system — t=[0.1 0.2 0.4 0.6 0.8 1 1.5 2...

4 years ago | 0

| accepted

Answered
How to Hide Legend of Plot 2?
Perhaps — zeys = n; text = ['Run ',num2str(zeys)]; hp1 = plot(x,y,'DisplayName',text); hp2 = plot(xmax,y...

4 years ago | 0

Answered
fminsearch for a function f(x,y) = x^4 -3xy+2y^2
It depends how you set up the function, and whether you use the function by itself or the norm of the function. The easiest w...

4 years ago | 0

Answered
how to calculate the differentiation by diff command ?
The diff function to calcualte the derivative is part of the Symbolic Math Toolbox. To calculate a numerical derivative, use ...

4 years ago | 0

| accepted

Answered
what is the argument I'm missing here? How to fix it?
This call: H_MMSE(: , r ) = MMSEesti(ReceivedPilots(: , r ) ,TransmittedPilots(: , r ), N, pilotFrequency, H_A2(1 ,1:2), SNR);...

4 years ago | 0

| accepted

Answered
2d surface or contour plot of three independent variables
The data are gridded. It is simply necessary to reshape them to plot them — sweep = readtable('https://www.mathworks.com/matl...

4 years ago | 0

| accepted

Answered
Is there a way to store execution times on a disk?
Perhaps tic and toc — s(1) = 0; t0 = tic; for k = 2:10 s(k) = s(k-1) + 1; t_int(k) = toc(t0); end Result = [s; t...

4 years ago | 0

| accepted

Answered
Interpolate rows of an image/matrix
Guessing — EvenRows = randn(5, 10); Matrix = NaN(10); Matrix(2:2:end,:) = EvenRows MatrixInterp = fillmissing(Matrix,'linea...

4 years ago | 0

| accepted

Answered
How do you make a label for a point on a plot separate into multiple lines?
Use sprintf instead — ii = 1; indMaxAmp(ii) = 24; maxAmp(ii) = 42; txt = sprintf('f = %.3f Hz\nP1 = %.3f dB', indMaxAmp(ii)...

4 years ago | 1

| accepted

Answered
contourf lower edge effects, how to fix and how does contourf work
We’re missing the filter function you’re using, so not able to run your code. However the pspectrum 'spectrogram' plot demonstr...

4 years ago | 1

| accepted

Answered
fft(x), why divide with L?
The Fourier transform uses repeated summations of the original vector to create the transform vector. Dividing my the length of...

4 years ago | 0

| accepted

Answered
How can I get my distance variable to be [0.1:0.7] to show as [0.1,0.2,0.3,0.4,0.5,0.6,0.7]
The default ‘step’ using the colon operator is 1, so the condition is immediately satisfied and only the first element appears. ...

4 years ago | 0

Answered
Can MatLab help this beginner with a chemistry problem about acid-base titrations
I was in the process of posting a response to the yesterday when my computer sbruptly crashed (in the wake of the Win 11 2022 2 ...

4 years ago | 0

| accepted

Answered
Help with 3D contours aligned to discrete surface data
Reading the files is not an option, so I went straight for the ‘Problem.fig’ file. I’m not certain that the contour lines ar...

4 years ago | 0

| accepted

Answered
How to display a particular range of log value at x-axis?
I am not certain what you want the result to be. Perhaps using xlim would work (regardless of the axis scaling, however it ma...

4 years ago | 0

| accepted

Answered
How to use a Fir1 filter to make a lowpass filter
The filter specification needs to be: blo = fir1(128,0.48,chebwin(129,30)); because of the filter length.. That will work. ...

4 years ago | 0

| accepted

Answered
Help with contours at maximum z-level in surfc
I asked about this a while ago, and received a repl;y from MathWorks that I sent along to Yair Altman for inclusion in Undocumen...

4 years ago | 0

| accepted

Answered
Help with choice of contour intervals in surfc
The second object in surfc is the countour plot, so address it and set the 'LevelList' property — [X,Y,Z] = peaks(50); figu...

4 years ago | 0

| accepted

Answered
How do I get a maximum and minimum for a singular wave while ignoring the other local maximums and minimums?
Using my code in How can I create isolated waves from data I have? — LvPks = islocalmax(y, 'MinProminence',0.01, 'MinSeparatio...

4 years ago | 0

| accepted

Load more