Answered
How to solve third order equation using ode45
I let the Symbolic Math Toolbox do everything — syms y(t) T Y Dy = diff(y); D2y = diff(Dy); D3y = diff(D2y); Eq = D3y - D...

4 years ago | 2

| accepted

Answered
COnvert x,y, time array into 3D matrix
Try this — xyt = [1, 3, 2 1, 3, 2.3 1, 3, 2 1, 3, 2.1 1, 3, 2.4 4, 5, 1 4, 5, ...

4 years ago | 0

| accepted

Answered
how can I change the code to have only unique CDF and PDF plot?not for all samples
I am not absolutely certain what you want. If you want one plot for the first and last subplots, rather than multiple lines i...

4 years ago | 1

| accepted

Answered
Need explanation on plotting frequency response of a causal discrete-time LTI system implemented using the difference equation.
‘does it mean H=RH_coeff, w=LH_coeff?’ No. The first argument are the numerator coefficients of the filter transfer function...

4 years ago | 1

| accepted

Answered
Obtaining value of highest order derivative over simulation period
One option would be to use the gradient function on the second column of the differential equation output (the integrated functi...

4 years ago | 0

Answered
bandpass filter design from low-pass iir filter
See if the lp2bp function will do what you want.

4 years ago | 0

Answered
How to make a table of strings from a table of numerics
I’m not certain what you want, however substituting compose for sprintf may be appropriate — arr = [1;2;3;4]; T = array2table...

4 years ago | 0

| accepted

Answered
3d surface plotting of spherical coordinates which i have in csv
Apparently, the angles sent to sph2cart were in degres, not radians. Try this with the complete file — M = [20 0 ...

4 years ago | 0

Answered
Help on ploting bar graph using table
There are mismatches between the number of names and the number of variables, and a missing comma between ‘Protein L’ and ‘Prote...

4 years ago | 0

| accepted

Answered
Modifying 3D plot
There are only two points, so I am not certain what you want for the others. One option could be to use stem3 instead — x =...

4 years ago | 0

| accepted

Answered
removing pops/clicks from audio file
The filloutliers function (or one of its friends) could be an option — [y,Fs] = audioread('https://transfer.sh/fR2wht/vinyl.mp...

4 years ago | 1

| accepted

Answered
How do I add a range and shade the area between these two graphs?
I will leave the cdf calculations to you. However the shading is not straightforward because the cdfplot contains two Inf val...

4 years ago | 0

| accepted

Answered
How to solve a system of differential equations using ode45 and vary the magnetic field and plot the solutions as a function of this field?
First, define ‘dRdt’ as: dRdt=@(t,R,B) then loop to substitute differeent values of ‘B’ and store the results. B=[0:0.1:10...

4 years ago | 0

| accepted

Answered
Derivative of Bessel function at x=0.
One option is to use the limit function, however tha does not always produce a numeric result. I ususally cheat and use eps i...

4 years ago | 0

| accepted

Answered
Comparison two curves (functions)
Use interp1 — x = linspace(1, 20, 30); y = tanh(x-12-rand)*2.5; x0 = interp1(y,x,0) figure plot(x,y, x0,0,'+r', 'Marke...

4 years ago | 0

Answered
How to average data per hour ?
Transpose it so that the columns are rows, create it as a timetable and then use the retime function specifying 'hourly','mean'....

4 years ago | 0

| accepted

Answered
How to integrate besselk function with variable limits?
One option is to use the arrayfun function to do the integration (essentially a one-line implied for loop) — % double x; y=0:...

4 years ago | 1

| accepted

Answered
Printing a message inside a function
Use either: sprintf('%s has finished running',file1) or: fprintf('\n%s has finished running\n',file1) depending on the res...

4 years ago | 0

| accepted

Answered
How can I estimate transfer function from frequency data?
The best way to see how well the estimated system fits the data is to use the compare function. Change (increase) ‘np’ using...

4 years ago | 0

Answered
is it possible to multiply 2 symbolic polynomials?
The easiest way to find out is to do the experiment — syms x f=[34 43 5] %and h=[32 34 4] % i can use the (conv command...

4 years ago | 3

| accepted

Answered
copy and paste datas from two Arrays into one
At leasty two options for this — A = [3 4 6]; B = [5 7 9 11 14 17]; C = [A; B] C = cat(1,A,B) .

4 years ago | 0

Answered
How do i count the signal within a certain time interval?
One option is to use the movsum function, and then threshold the result — t = linspace(0, 100, 100); s = rand(100,1)>0.80; ...

4 years ago | 1

| accepted

Answered
How can I falsely increase the frequency of acquisition of a signal?
I do not clearly understand what you want to do. However, if you want both signals to have the same sampling frequency, use t...

4 years ago | 0

| accepted

Answered
Parsing .txt File with Unique Format
This will read it successfully — fidi = fopen('sample.txt','rt'); k1 = 1; while ~feof(fidi) C = textscan(fidi, repmat('...

4 years ago | 2

| accepted

Answered
How to conversion of Acceleration FFT to Velocity?
Perhaps something like this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/994900/fantest.xl...

4 years ago | 0

| accepted

Answered
FFT of vibration data, Help me please.
Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/994895/fantest.xlsx%20-%20Sheet2.xls...

4 years ago | 0

| accepted

Answered
Plotting poles and zeros
I am also wondering, however I am reasonably confident that ‘b’ and ‘a’ are not derived from a Control System Toolbox tf functio...

4 years ago | 0

Answered
Can't figure out why my ODE solver is producing a straight line
It plots a straight line because all the initial conditions arre zero. Add eps (or some small, non-zero value) to them, and i...

4 years ago | 0

| accepted

Answered
how to find the intersection points of two 3d surfaces
Try this — fcn = @(Lambda,V) [2.0346941376982715 + (0.33000000000000007 - 0.5 * V); (1./Lambda).^0.9523809523809523]; % wher...

4 years ago | 0

Answered
How to work with categorical or "cell" variables within a table?
Converting the ‘Date’ and ‘Time’ variables to datetime arrays is straightforward, however it is not obvious. Try this — T1 ...

4 years ago | 1

| accepted

Load more