Answered
optim.problemdef.OptimizationProblem/solve SOLVE requires a non-empty initial point structure to solve a nonlinear problem.
My advice is: Do what the error message tells you to do and supply an initial point structure to make MATLAB happy. initial.e =...

3 years ago | 0

Answered
how to remove error form BVP4C code
The odes you want to solve cannot be defined in two separate ODE functions. If you want to solve two differential equations sim...

3 years ago | 0

| accepted

Answered
fplot showing different curve to plot
plot(p_a,Q) instead of plot(Q,p_a): M = 100; p_b = 2; Q = @(p_a) M./(p_a + p_b); hold on fplot(Q, [0 35]) ylim([0 ...

3 years ago | 0

| accepted

Answered
Numerical solution to a larger equation.
What is the zero of your choice ? fun = @(lamda2)sinh(5.9605e-08*(((1.1259e+15*lamda2^2 + 7.5126e+15)^2)^(1/2) + 7.5126e+15)^(1...

3 years ago | 0

Answered
What is wrong with my code, my equation is vdv/dy=-G*M/(y+R)^2 ?
syms G M R y v(y) Dv = diff(v,y); eqn = diff(v,y,2) == -G*M/(y+R)^2; cond = [v(0)==100,Dv(0)==0]; sol = dsolve(eqn,cond) Gn...

3 years ago | 0

Answered
How to compare elements of two vectors in MATLAB ?
A = [1 2; 3 4]; B = [1 4; 3 5]; sum(A(:)~=B(:))

3 years ago | 0

| accepted

Answered
Problem with time steps in Runge-Kutte method
vx(i+1) = vx(i) + (1/6)*(K1(2)+2*K2(2)+2*K3(2)+K4(2))*h; vy(i+1) = vy(i) + (1/6)*(K1(4)+2*K2(4)+2*K3(4)+K4(4)...

3 years ago | 1

Answered
Travelling salesman problem - Dimension of arrays issue
To concatenate the three vectors, sqrt((Min_Dist(:,2)-SortedCoordinates(i,2)).^2+(Min_Dist(:,3)-SortedCoordinates(i,3)).^2) C...

3 years ago | 0

| accepted

Answered
How to compute the double integral over dx and dy?
dx = 0.1; x = -0.5:dx:0.5; dy = 0.1; y = -0.5:dx:0.5; N = length(x); a = randn(N,N); b = randn(N,N); F = (a-b).^2; % Use...

3 years ago | 0

Answered
find equilirium point with all parameter known
I don't know if this solves your problem, but of course you have to reverse the order of the commands here: if (hdot(4)<0) ...

3 years ago | 0

Answered
Curve fitting the data series
The function you define as fitting function tends to Rdc + R1 + R2 + R3 + R4 + R5 as f tends to infinity very fast. In contrast...

3 years ago | 0

Answered
Using fsolve for a set of complex equations
If you want to define K_step*X_step-F_step as a function handle, you will have to define all expressions involving components of...

3 years ago | 0

Answered
how to find equlibrium point of 5 non linear system with numerical method
I don't know if the result is as expected. format long yequi = fsolve(@fun,rand(5,1)) fun(yequi) function dydt = fun(y) e...

3 years ago | 0

| accepted

Answered
Array indices must be positive integers or logical values.
H(0) does not exist in MATLAB. Array indices start with 1. And if inv(K-W^2*M) is a matrix, you cannot save it in a scalar H(W)...

3 years ago | 0

Answered
Help with implicit functions in vector form
I have no clue why this happens since the two expressions are exactly the same. The reason is that [x y 1]*w' cannot be evaluat...

3 years ago | 0

Answered
Please Help using fsolve (error)
f1 = (5+x1+x2)/(50-2*x1-x2)^2/(20-x1) - 4e-4; f2 = (5+x1+x2)/(50-2*x1-x2)/(10-x2) - 3.7e-2; f=[f1;f2] And it seems that you d...

3 years ago | 0

Answered
Extra variable in differential equation's symbolic solution
ans1=dsolve(eqn2,'MaxDegree',3) gives the explicit (complicated) solution. For each t, root(...) means the root of the polynom...

3 years ago | 1

Answered
Initial conditions for PDEPE
Maybe you could add a little diffusivity to the components with spurious oscillations (those with f=0). If this is not possible:...

3 years ago | 1

| accepted

Answered
Goodness of fit for a Zipf distribution
I set up the maximum likelihood function for your data and came up with an estimated value of s = 2.116 for the distribution par...

3 years ago | 1

| accepted

Answered
Problem solving simultaneous ODEs using 4th order Runge-Kutta method (Too many input arguments.)
I changed (1./(1+(1/B).*C22d)).*(-c1.*(K22.*vy)); to (1./(1+(1/B).*C22d)).*(-c1.*(K22d.*vy)); in the definition of fvy. And...

3 years ago | 0

Answered
incorrect number or types of inputs or outputs for function 'int'
% Define the parameters of the signal A = 1; % Amplitude T_0 = 4*pi; % Period syms t % Generate the signal ...

3 years ago | 0

| accepted

Answered
How to solve system of ODE's with Boundary Conditions using BVP4C? (I would be very helpful for you)
Your remaining task: A loop over the values of M. M = 1.0; bvpfcn = @(x,y)[y(2);y(3);-y(1)*y(3)+y(2)^2+M*y(2);2*y(3)+2*y(1)*y(...

3 years ago | 1

Answered
How to solve a system of three coupled vectorized second order ODEs
System to solve for r1=(r1x,r1y,r1z) is: dr1x/dt = v1x dv1x/dt = K1*(m2*(r1x-r2x)/((r1x-r2x)^2+(r1y-r2y)^2+(r1z-r2z)^2)^1.5 + ...

3 years ago | 0

Answered
how to combine matrices
I think you mean xp1 = rand(2,3); xp2 = rand(4,5); xp3 = rand(1,4); xp4 = rand(12,18); szx1 = max([size(xp1,1),size(xp2,1),...

3 years ago | 0

Answered
Why does it give me errors during numerical integration?
T0=1;Hrxn=1;CpSum=1;K0=1;E0=1;R=1;FA0=1;FB0=1;FC0=1;FD0=1;thetaB=1;thetaC=1;thetaD=1;FT=1; T = @(x) T0 + (-Hrxn)./(CpSum).*x; ...

3 years ago | 0

| accepted

Answered
Index exceeds the number of array elements. Index must not exceed 10000.
My guess is that "Ytrain" has less than "len" elements. To confirm this, add the lines disp(len) disp(size(Ytrain)) after th...

3 years ago | 0

| accepted

Answered
Estoy intentando acceder a los costos de las licencias para matlab
Contact Sales: https://de.mathworks.com/company/aboutus/contact_us/contact_sales.html

3 years ago | 0

Answered
REQUIRE CODE FOR PARAMETER IDENTIFIABILITY FOR ODE BASED MODEL HAVING KINETIC PARAMETERS.
Take a look at https://de.mathworks.com/matlabcentral/answers/1933060-find-kinetic-constants-from-differential-equations?s_tid=...

3 years ago | 0

| accepted

Answered
Getting Error Codes, not exactly sure what they mean or how to fix them, please help
% Define circuit parameters Vin_rms = 120; % V Vout = 2.4; % V Iload = 25e-3; % A Vripple = 0.12; % V R2 = 1e3; % Ohm...

3 years ago | 0

Answered
I am trying to get the answer for the sum to infinity for a geometric series. My output should be 3/2 and a loop should be used. I've done that but it won't work. Please help
Sum2Infinity = 0.0; for i = 0:1:10000 Sum2Infinity = Sum2Infinity + FirstTerm * CommonRatio^i; end

3 years ago | 0

| accepted

Load more