Answered
Fsolve and initial guesses
You already received several responses for this question here: https://uk.mathworks.com/matlabcentral/answers/1973704-interpret...

3 years ago | 1

Answered
Find value at which a line changes its slope
Plot gradient(y)./gradient(x) over x to get an approximation of the derivative of your curve and see if this curve can give you ...

3 years ago | 1

Answered
Why do i keep on receiving the same error? Please show me how to fix the code!
Your function "predprey" must return a row vector, not a column vector: Use function yp = predprey(t, y, a, b, c, d) yp = [a ...

3 years ago | 0

| accepted

Answered
Check ode45 for a certain value and start a new solver when these limitations are reached
That's exactly what the Event facility of the ODE integrators does. Look at the "ballode" example: https://uk.mathworks.com/he...

3 years ago | 1

| accepted

Answered
Error using fmincon line 619
Why do you solve a linear optimization problem with "fmincon" ? Use "linprog" instead. R = [120.97, 462.26, 231.65, 140.94, 26...

3 years ago | 1

Answered
MatLab Multiple graphs in one axis
That your measurement curves overlap and those in the literature don't is a fact. You won't be able to hide this by any special...

3 years ago | 0

Answered
How to do a Taylor expansion with a matrix
Maybe you mean: G = [0,4;4,0]; Gexp = expm(G) or syms t G = [0,4;4,0]*t; Gexp = simplify(taylor(expm(G),t,'ExpansionPoint'...

3 years ago | 1

| accepted

Answered
How to use Runge-Kutta orde 4 in sigmoid equation. I want to plot sigmoid equation with Runge kutta orde 4th but my graph is linear. I need help
Why do you use a method for ordinary differential equations to integrate a simple function of the independent variable ? Use "...

3 years ago | 0

Answered
Interpreting the results of 'fsolve'
Can I trust the variable solutions that is computed for me? An error norm of 0.000177715 is not bad, but "fsolve" couldn't do b...

3 years ago | 0

| accepted

Answered
Show more than plot at the same time
help figure https://uk.mathworks.com/help/matlab/ref/figure.html help subplot/tiledlayout https://uk.mathworks.com/help/matla...

3 years ago | 0

Answered
Nested differentiation in nested integral
I would (without mathematical scruple) differentiate with respect to "r" under both integrals, then use "integral2" to integrate...

3 years ago | 0

| accepted

Answered
How would I remove multiple specific elements from an array.
Data = [923 916 932 927 908 931 953 926 919 963]; B = sort(Data,'ascend'); n = numel(B); xmin = B(1); xmax = B(n); Q1 = rou...

3 years ago | 0

Answered
Trying to apply a general exponential fit to data
As written in the output from CFtool: x is normalized by mean 9.301 and std 6.055. Thus, for x in the equation, you have to ins...

3 years ago | 0

| accepted

Answered
Vectorizing Loops over Matrix Elements
If the function f "knows" how to cope with two vectors as inputs that don't have the same size: Yes. E.g. n = 3; m = 5; f = ...

3 years ago | 0

| accepted

Answered
hello. how I create function?
You should ask the authors of the code why they didn't include the function "checkHexagonal". Maybe these are the additional fu...

3 years ago | 0

Answered
Fsolve with different combinations of parameters
Varying the initial values for the unknown variables should be the first step. Try "MultiStart". Varying parameters is usually ...

3 years ago | 0

| accepted

Answered
Matlab unable to find symbolic solutions for an ode
Do you mean diff(- FgE + FgM + Ft,t) instead of diff(t)*(-FgE + FgM + Ft) ? Because diff(t) does not make much sense to me. If ...

3 years ago | 0

Answered
how to solve a system of linear equation in matlab for gridded data
As said, you can't estimate z and a separately. Say you have y = z + a and data for y. Say you get z = 4 and a = 2 as solutio...

3 years ago | 1

Answered
Error using odearguments due to vector incoherent
Use dxdl=[dx1dl;dx2dl;dr1dl;dr2dl;dTdl]; instead of dxdl=@(l,x) [dx1dl;dx2dl;dr1dl;dr2dl;dTdl]; But nothing will be plotted ...

3 years ago | 1

| accepted

Answered
Fourth order nonlinear DE solution where forcing function interpolation is known
You will have to use bvp4c, not ode45. And interpolation in the function where you define the derivative function can be done v...

3 years ago | 0

| accepted

Answered
Empty sym: 0-by-1 in solving a system of equations
MATLAB is correct: your system has no solution. You have a linear system of equations, and the vector of the right-hand side is ...

3 years ago | 0

| accepted

Answered
Surf a function with different values
Define the function as f = @(x,y) (y>=2*x) + 2*(y<2*x); and make a surface plot.

3 years ago | 0

| accepted

Answered
symbolic substituiton with logical operators
syms B L m = [0 0 3;1 2 0]; m = sym(m); idx = m > 1; m(idx) = B; m = subs(m,1,L)

3 years ago | 1

| accepted

Answered
How to code multiple "if" conditions in app designer?
if a < b < c does not work. You have to split the condition in two: if a < b & b < c And if a = b does not work. A logic...

3 years ago | 0

Answered
the loop is not converging it is giving me an infinite value(it is increasing)
Why do you think your fixed-point iteration should converge ? If the absolute values of the eigenvalues of A were all < 1, it ...

3 years ago | 1

Answered
graph of iterative sequence
Add the command plot(1:n+1,x) at the end of your code.

3 years ago | 0

| accepted

Answered
Solving system of 4 equation
Try "fsolve": e0 = [e10;e20;e30;e40]; % initial guesses for i = 1:25 fun = @(e1,e2,e3,e4) [((nco+v3*e1+v22*e2+v41*e4)^2...

3 years ago | 0

Answered
Time dependent InternalHeatSource where the heat input is in a vector.
Is there a way to pass a vector of heat inputs and the PDE solver using the same time steps as specified in my time vector? No....

3 years ago | 1

| accepted

Answered
how do i properly code a formula with multiple summations in matlab?
% parameters: M_array = 1:100; % Number of BS antennas SNR0_dB = 0; % SNR of the desired UE (in dB) SNR0 = 10.^(SNR0_dB/10...

3 years ago | 0

| accepted

Answered
Problem with solving an ODE
Use bcfcn = @(ya,yb)[ya(1)-(5+ya(2)*2)/0.49;yb(2)-1]; instead of bcfcn = @(ya,yb)[ya(1)-y0;yb(2)-1]; in your code.

3 years ago | 0

| accepted

Load more