Answered
How do I get an output in vector form of (h,m)
It is not certain what you want or what size ‘data’ is. If ‘PumpA’ and ‘PumpB’ are always assigned scalars in each iteration, t...

4 years ago | 0

Answered
Reverse the values shown on a colorbar
Use flipud on the colormap — [X,Y,Z] = sphere(50); Z = Z*20 + 290; figure surfc(X, Y, Z, 'EdgeColor','none') colormap(gr...

4 years ago | 1

| accepted

Answered
How to extract signal segments from a long signal given each segment's start and end points
Perhaps — First load ‘Time’ and ‘combinedAccel_01’ and ‘ROILimits’ into the workspace. Then extract them to a cell array: ...

4 years ago | 1

| accepted

Answered
Improve a scattering plot: How to make it clearer?
The LaTeX tick labels simply require specifying TickLabelInterpreter = 'latex' — xlabel('$$a$$', 'Interpreter','latex'); yla...

4 years ago | 0

| accepted

Answered
fft question about data length and spline data
If you have R2016b or later, the fillmissing function will likely be a better choice.

4 years ago | 0

Answered
Trying to find the min non-zero value of a [925x902] matrix
Perhaps — D1.Z = rand(925,902) % Create Test Matrix D1.Z(randi(numel(D1.Z),1,5)) = 0; ...

4 years ago | 0

| accepted

Answered
how can I plot a bode plot of transfer function that has one variable that changes the frequency response?
Perhaps something like this — R = 1E+3; C = 1E-6; % L = 1E-3; s = tf('s'); H = @(L) 1 / (R + L*s + 1/(C*s)); ...

4 years ago | 1

| accepted

Answered
I would like to take the inverse laplace transform of a transfer function.
The Control System Toolbox tf objects cannot directly be used as symbolic objects. So it has to be re-defined as a symbolic fra...

4 years ago | 1

| accepted

Answered
Using the fsolve command to find Turning Points from Jacobian Matrix
Perhaps — syms x y f(x,y)= x^(2-x^(0.5))+y^(2-y^(0.5)) J = jacobian(f) Jfcn = matlabFunction(J, 'Vars',{[x,y]}) format ...

4 years ago | 1

| accepted

Answered
using nonlinearmodek fit for the first time
The NonLinearModel is a class. To do the actual nonlinear regression, use the fitnlm function.

4 years ago | 0

Answered
Integration containing multiple variable and plotting
To use vectors as arguments in the integrand, it is necessary to use integral and the 'ArrayValued',true name-value pair — % ...

4 years ago | 1

| accepted

Answered
STuck at coding second order differential equation (mx"+cx'+kx=f0coswt)
Refer to the ‘num_for’ function as a function handle. Quoted character arays ar not longer recognised. Tspan=[0 10]; y0=[...

4 years ago | 1

Answered
numerical integration using trap()
Since ‘filtered’ is apparently a matrix, perhaps — filtered = randn(10,10); %1.Moment [row,column] = size(filtered); x=1:...

4 years ago | 0

Answered
Graphing region of intersection
In your original earlier post the cylinders were described differently. Using that definition, I would do something like this...

4 years ago | 0

| accepted

Answered
Calculating mean of signal between certain time interval in a loop.
It is not possible to do anything with an image of data. Simulating it — t = linspace(0, 20); s = ((1 - exp(-1.5*t)) + 0.5...

4 years ago | 0

| accepted

Answered
plotting shaded area of integral
The function creates a surface, and the integral has only a scalar value, so perhaps something like this — F = @(x,y) y.*sqrt(...

4 years ago | 0

| accepted

Answered
Double Integral using ymax and ymin
Use element-wise operations for the multiplications and divisions in the anonymous functions. Also exp must have an argument. ...

4 years ago | 0

| accepted

Answered
What is the first and second drevitive of the unit step signal?
Do the experiment — syms t u(t) = heaviside(t) dudt = diff(u) d2udu2 = diff(dudt) .

4 years ago | 0

| accepted

Answered
Linear regression : How to take into account the quadratic term only and not the linear term ?
Suppress the intercept term and the linear ‘Var3’ by negating them — newT2 = array2table(rand(7,3)) ...

4 years ago | 0

Answered
Why the responses of the following equations are nothing?
Use solve then vpa — syms ae gama A eq1= (23.4255*(ae^3))+(1.2308e-06*ae)+gama eq2= (A/(6*23.4255))-((2*1.2308e-06)/A)-ae ...

4 years ago | 1

Answered
I am trying to clean a large dataset that contains "Nan" values. I want to delete the array that contains at least one "nan" value.
Use the any function, specifying across rows (dimension 2) — A = [[0, 0.0, nan, nan, nan, nan, nan]; [0, 0.0, nan, nan, nan, n...

4 years ago | 1

| accepted

Answered
how du I construct the following Horizontal graph?
This should get you started — x = datetime(1980,1,1) : calmonths(1) : datetime(2013,12,31); % Create Vector y = sort(ra...

4 years ago | 0

| accepted

Answered
How to vary an element in a matrix?
Use a for loop or arrayfun — % System parameters k1=180 * linspace(0.5, 1.5, 9); % Define 'k1' As...

4 years ago | 1

| accepted

Answered
Incorrect 3d graph of Complex Function (with Singular Matrix Error)
Use element-wise division — f = (exp(z))./(z-2); a = -500:10:500; b = -500:10:500; [A,B] = meshgrid(a,b); z = A + 1i*B; ...

4 years ago | 0

| accepted

Answered
Animated 3D Scatter Plot
Try this slightly augmented version — figure(1) hold on grid minor axis([0 2 0 2 0 2]) for i = 1:nume...

4 years ago | 1

| accepted

Answered
1 hour of ECG signal to be splitted into 10 sec in mat format
Use the buffer function — seclen = 10; % Length = 10 Seconds Fs = 256; ...

4 years ago | 0

Answered
How can i interpolate this data?
If I understand the problem correctly, use the fillmissing function across the rows — A = [0 NaN 0.5 0.3 0.7 ...

4 years ago | 1

| accepted

Answered
Surf or Mesh plot
Since ‘z’ must be a matrix to use surf or mesh, the call must be: t = linspace(0, 5100, 5100); y = linspace(0, 34, 34); z =...

4 years ago | 0

| accepted

Answered
angle and abs function gives me 'Subscript indices must either be real positive integers or logicals.' error
First the code defines: angle= -acosd(app.Power_factor.Value); then later it calls the angle function: I_input_angle= angle...

4 years ago | 0

| accepted

Answered
How to calculate the standard deviation of individual points in a dataset
The standard deviation of a point is 0. The size of ‘sd’ here must be the same size as both ‘x’ and ‘y’ so ( vertically conc...

4 years ago | 1

| accepted

Load more