Answered
Need help to make a ode function asign a value
There are several problems (not the least of which is the absence of the necessary variables, so it is not possible to run your ...

2 years ago | 0

Answered
How to get finer data sampling?
Use the 'MeshDensity' name-value pair — R0 = 0.917; h0 = 1; n = 8; rk = 1; k = 1; d = 32/180*pi; Lv0 = sqrt(h0.^2+2*R0...

2 years ago | 0

| accepted

Answered
How to extract data of one solution from multiple solutions?
This can be done using the clusterdata function, followed by accumarray — R0 = 0.917; h0 = 1; n = 8; rk = 1; k = 1; d = ...

2 years ago | 1

| accepted

Answered
I am trying to get my answer to Display but it wont let me
Another option — syms f(x) f(x) = (x^3) - (7*x) + 6; x=solve(f(x)==0,x); disp(["the roots will be ",string(x.')]) Note the...

2 years ago | 0

Answered
How do I keep original headers when bulk converting CSV files to Excel and deleting everything except for three columns?
With respect to getting the original headers (variable names), with readtable use 'VariableNamingRule','preserve' (in earlier ve...

2 years ago | 0

| accepted

Answered
Find line containing word in a mixed format txt file
I am not certrain how the table actually exists in the file (and it would help significantly to have the actual file rather than...

2 years ago | 0

| accepted

Answered
How to fill the area between lines in gray shade
This becomes a bit more complicated with multiple lines. This assumes you want the gray region between the maximum and minimu...

2 years ago | 0

| accepted

Answered
How to add vertical line in z direction in YZ view meshplot?
I do not completely understand how you are creating the ‘YZ’ view. If you are creating it using ‘vlew(90,0)’ the first option...

2 years ago | 1

Answered
Drawing a bode plot of the Duffing equation, which is a special application of the integro-differential equation model.
The problem with using a two-element vector for ‘tspan’ is that the MATLAB ODE integrators do not produce regularly-spaced time ...

2 years ago | 1

Answered
Error using integral function with anonymous function
Perhjaps using integral2 instead will work here — C1 = 3.742e8; C2 = 1.4388e4; SB = 1.38*10.^-23; %Boltzmann's constant C1 ...

2 years ago | 0

Answered
Fitting model to data set by estimating parameters
The calculated ‘YSol’ should return a (Nx3) matrix where ‘N’ equals ‘numel(t)’ so if it does not, you need to determine the reas...

2 years ago | 0

| accepted

Answered
Concatenate the index i within the loop
Use the compose function — num_labels = 10; labels = compose('Node %d',1:num_labels) .

2 years ago | 0

| accepted

Answered
How to solve equation with several unknown variables for a specific variable?
The isolate function is helpful here — syms w0 g l r l a m eqn = m*g*l*(1-cos(a))==1/2*1/2*m*(r^2+2*l^2)*((r^2/(r^2+2*l^2))*w...

2 years ago | 0

| accepted

Answered
Eliminating specific data from a file
There are functions like fillmissing to interpolate the NaN entries and rmmissing to delete them (the entire row with a NaN entr...

2 years ago | 0

| accepted

Answered
Default output for ps in the spectrogram function
Apparently the default for spectrumtype is 'psd'. At least that’s how I read it.

2 years ago | 0

| accepted

Answered
Can we generate best fitted nonlinear equation between 4 inputs and 1 output, if we dont know the equation initially
Ideally, the nonlinear objective function is a mathematical model of the process that created the data. Otherwise, there are ...

2 years ago | 0

Answered
Loading variables to a specifc workspace
One option to transfer specific variables to your script (calling) workspace would be to include them as outputs of your functio...

2 years ago | 0

Answered
How do you express the root locus for k in MATLAB
Perhaps something like this — K = 1:3; % Define: 'K' (Vector) s = tf('...

2 years ago | 0

Answered
Draw the surface of a two variables function
All the variation occurs near the centre of the surface. You can begin to see that in the contour plot using surfc, however to ...

2 years ago | 0

Answered
how to plot different horizontal lines over each group of bar plot
Try something like this — A = (5+rand(10))/6; figure hb = bar(A); for k = 1:numel(hb) xep(k,:) = hb(k).XEndPoints;...

2 years ago | 0

| accepted

Answered
Plotting Multiple Shaded Uncertainties
That appears to be correct, although it would be necessary to provide the data to check for any errors. You can prevent the p...

2 years ago | 0

| accepted

Answered
Matrix dimensions do not match
Either ‘z’ or ‘jd’ has to be a (16x1) double for that to work. That discrepancy is throwing the dimension error. .

2 years ago | 0

Answered
textscan syntax help converting file
Try something like this — Array = {'Item1', 2526976, 8, 14, 11, [224,224,137,80] 'Item2', 2526976, 8, 18, 15, [224,2...

2 years ago | 0

| accepted

Answered
Scatter Plots, for Rolling data
I am not certain that I fully understaznd what you want to do. Probably the easiest way to do that (without actually deleting a...

2 years ago | 0

| accepted

Answered
Having trouble with confidence bands on Kaplan-Meier curve
You have one typographical error. This assignment: lower2 =datatable.Cohort1SurvivalProbability95CILower; should instead b...

2 years ago | 0

| accepted

Answered
p values equal to 0
The ‘pValue’ of 0 means that with extremely high degrees-of-freedom (estimating 4 parameters with 2229207 observations) and appa...

2 years ago | 1

Answered
How do get 'plumblines' for scatterplot points?
Use the stem3 function. If you want to colour the points, use something like this — figure stem3(X, Y, Z) hold on scat...

2 years ago | 0

| accepted

Answered
what's the index exceed error?
The indexing problem is that ‘sig’ is preallocated as a vector: sig = zeros(1,405); % Preallocate the array Preallocating it ...

2 years ago | 0

| accepted

Answered
How to put time column at X axis from timetable against column 2,3,4 Y axis.
Perhaps something like this — TT = readtable(path_to_file); TT.Time = datetime(TT.Time, 'InputFormat','yyyy-MM-dd''T''HH:mm:s...

2 years ago | 0

| accepted

Answered
Finding a definite integral
Use the 'ArrayValued' name-value pair with integral — u = [0.1600 0.1600 0.1599 0.1599 0.1597 0.1596 0.1594 ...

2 years ago | 0

Load more