Answered
How do I combine multiple plots separately on one figure?
The two options are subplot and stackedplot. I use subplot here — figure(1) R1 = 6; R2 = 2.5; R3 = 2; time = 0:0.01*pi:...

5 years ago | 1

| accepted

Answered
Convert from Coordinated UTC to datetime?
A different approach — format long g nr = 1.511092230713565e+05; dt = datetime(num2str(fix(nr)),'InputFormat','yyMMdd') + ti...

5 years ago | 0

Answered
EEG Channel Data Filtering
The first step would seem to me to calculate the fft of the raw data to see what the frequency content is. Since neither the ...

5 years ago | 0

Answered
Plot columns of data in discrete datapoints?
Try this — Z = [1 2 1; 2 2 1; 1 1 3]; Y = size(Z,2):-1:1; figure hold on for k = 1:numel(Y) X = Z(k,:...

5 years ago | 1

| accepted

Answered
How can I fix the "vectors must be same length" error?
The posted code doesn’t provide a lot to work with. If ‘T’ is a column vector, ‘t’ will be a scalar equal ot 0, and that could ...

5 years ago | 0

| accepted

Answered
How to switch to this graph? Mathematical question
Try this — x = [0 0.5 1]; a = [1 0.2 0.2]; b = [0 0.4 0.4]; c = [0 0.4 0.4]; figure patch([x flip(x)], [c zer...

5 years ago | 1

| accepted

Answered
Accelerometry design filter and outline
Consider decreasing ‘Fpass2’ and ‘Fstop2’ since they are obviously not filtering out the high-frequency noise. To design the ...

5 years ago | 0

| accepted

Answered
Fourier transform of symbolic function
Use the fourier function. I’m guessing as to what ‘wilberforce_y’ and ‘wilberforce_z’ are. syms t omega T syms y(t) z(t...

5 years ago | 0

| accepted

Answered
how to make a list of coordiantes (x, y, z)
It is not possible to use the original vectors because they have different lengths (1x10) and (1x20). That aside, drawing a ...

5 years ago | 0

Answered
Generating a pulse signal
The posted code is an extremely cumbersome way of coding an extremely straightforward problem. The ‘fcn’ function here should...

5 years ago | 0

Answered
Using an improper transfer function in simulink
See: How can I implement an improper transfer function (without delays) in Simulink? .

5 years ago | 0

Answered
How to smoothen the curve in Matlab, preserving the original data points at a acceptable level?
I am not certain what the desired result is. It is straightforward to force a curve to have a zero intercept, although the code...

5 years ago | 0

| accepted

Answered
Plotting Kinetic Model Monod, Haldane Equation
I got it to run correctly, however I made no other changes (and there need to be other changes), leaving those for you. It is...

5 years ago | 0

| accepted

Answered
trying to plot a harmonic function, but i keep getting an fplot error.
Try this — syms x y u = x^2 - y^2; figure hold on for c = 2:2:20 result = solve(u == c); fplot(result) end ...

5 years ago | 0

| accepted

Answered
XData and YData from area chart
Add (cumsum) ‘Y’ row-wise to get the coordinates — t = 1:10; Y = randi(9, 10, 3) Ycoordinates = cumsum(Y,2) figure h =...

5 years ago | 1

| accepted

Answered
Is it possible to create a plot from a table?
Creating a plot from a table is straightforward, although the references are different — T1 = array2table(randi(99, 5,3), 'Var...

5 years ago | 0

| accepted

Answered
wrong output of parsing datestr
I do not see that there is a problem, other than not specifying that the input times are 12-hour, not 24-hour format. datevec...

5 years ago | 0

| accepted

Answered
Removing rows from array using indices
If ‘Rowidx’ is a logical array, that might not work as desired. If it is a numerical array, then if ‘A’ is any of the arrays ...

5 years ago | 1

| accepted

Answered
How can i get optimization or interpolation value for this 3-data?
I doubt that any interpolation is necessary. Juyst find (and if desired, plot) the minimum and associated values — x = [30 ...

5 years ago | 1

Answered
FFT of sound wave frequency graph
I have no idea what the desired result actually is, even when I run the code and plot it. See if the envelope function will p...

5 years ago | 1

| accepted

Answered
How can I convert categorical variable to continuous variable in MATLAB?
I am not certain which are the categorical variables. The variable names can be referred to as elements of the cell array tha...

5 years ago | 0

| accepted

Answered
Saving vector result from each loop if solution is correct.
Use the exitflag output from fsolve to determine whether a solution was found. .

5 years ago | 0

| accepted

Answered
How to trim audio in Matlab to get the desired audio duration?
Express the desired length in thems of samples (here ‘Fs’ is the smapling frequency in Hz) — desiredLength = 17.5500; ...

5 years ago | 1

| accepted

Answered
How to make the color change in a graph more dramatic
Choosing a different colormap is the only option I am aware of. .

5 years ago | 0

| accepted

Answered
How to compute the magnitude and phase difference of an input and output signal in a single time-domain plot?
See if the alignsignals function will produce the relevant phase information (with respect to the index difference). Without ac...

5 years ago | 0

Answered
i want to treat w as a constant
It ia necessary to include ‘w’ in the syms declaration, then it will be considered a constant unless it is declared as something...

5 years ago | 0

| accepted

Answered
how do i solve simultaneous equation by matrix?
I am not exactly certain how the ‘A’ matrix is created, however the mldivide,\ function and operator is likely the solution to f...

5 years ago | 0

| accepted

Answered
Solving complex coupled differential equations numerically with initial condition
Start with the Symbolic Math Toolbox ... syms A a(t) b(t) delta omega s T eqn1 = diff(a) == 1i*T/2 * (A*cos(omega*T*s)*a + de...

5 years ago | 0

Answered
I have a system of ODE with several parameters. I would like to plot the curves as I vary the parameters,
Use a for loop. Example — tauv = [0.1, 0.4, 0.5, 0.8]; odefcn = @(t,x,tau) [-x(1)*tau; exp(-tau*x(2))]; tspan = 0:0.1:5;...

5 years ago | 0

Answered
How to reduce angle values in a range between 0 and 360 deg?
I am not certain what the desired result is. Something like this came up once before, and since wrap2pi and wrap2360 are avai...

5 years ago | 1

| accepted

Load more