Answered
role of flux f in bcfun of pdepe for systems of PDEs
This multiplication is nowhere performed within "pdepe". But if you look at the pdepe code below, the cases where q = 0 and q di...

24 days ago | 0

| accepted

Answered
Logit panel with Simulated Maximum Likelihood. Convergence question with fminunc
Your objective function depends on random values. This is not allowed for deterministic optimization as done by "fminunc". Conve...

24 days ago | 2

| accepted

Answered
It keeps giving me an error on line 4, saying I'm missing input arguments but I have everything defined?
Q = 9.4e-6; q = 2.4e-5; R=0.1; epsilon= 0.885e-12; F=@(z)(Q*q*z) .*((1-z)./(sqrt(z.^2+R.^2)))/(2*epsilon); z1 = 0.5; z2 =...

24 days ago | 0

| accepted

Answered
GA does not solve problems with integer and equality constraints
Your code from above works for me. Test it. Because you only have inequality constraints, you must set h = [] instead of h = z...

25 days ago | 0

| accepted

Answered
Solving equations using Newton-Raphson method for 7 equations with 7 variables
You have a linear system of equations. No Newton method is required in this case. But since a only has rank 2, no solution exis...

25 days ago | 0

Answered
Why am I getting the error "Too many output arguments"?
You don't initialize "error" in your code by giving it a value before you use it in the while loop. That's why MATLAB assumes e...

25 days ago | 1

Answered
I get an error using fminsearch and says Simulink model "model ex3" was called with incorrect number of arguments. I have attached a picture to show it.
Try calling fminsearch as [xSolution,fval] = fminsearch(@(x)model_ex3(x,par),x0) If this doesn't work, we need to know the inp...

25 days ago | 0

Answered
How to simplify infinite double matrix summation in Matlab.
Are you sure that the matrix potentials for A and R are meant elementwise ? beta = 1.5; A = [1 0;0 2]; R = [0 3; 1 1]; t = 1; ...

26 days ago | 2

Answered
How to convert the attached equations in Matlab?
I'm not sure if you mean m.^2.*f.^2./16.*r or m.^2.*f.^2./(16.*r) in your equations. I assumed that your equations.png is corr...

26 days ago | 0

| accepted

Answered
solvepde function MATLAB "c" term identification
https://uk.mathworks.com/help/pde/ug/c-coefficient-for-systems-for-specifycoefficients.html Chapter Definition of the c Tensor...

26 days ago | 0

Answered
How do I calculate the cross product of two vectors, when the first vector is an element of a N-array and the second vector is an element of an NxD matrix;
r1 = rand(30,3); r2 = rand(30,50,3); for i=1:30 for j=1:50 c(i,j,:)=cross(r1(i,:),squeeze(r2(i,j,:))); end ...

26 days ago | 1

Answered
How to apply loop on following case?
Make a function of the part of the code that you have to run through three times and call this function for IP_OPT, IS_OPT and R...

27 days ago | 0

Answered
Pdepe cylindrical coordinates with Neumann BC
You will have to use pl = P * (interp1(NP1(:,1), NP1(:,2), t, 'spline', 'extrap') - (cl/Kav)); ql = 1; %ignored by sol...

27 days ago | 0

| accepted

Answered
Find a weight matrix and bias which performs the following binary classification
Write your own hardlim function (see below) or license the Deep Learning Toolbox. N = -1+2*rand(10,5) S1 = my_hardlim(N) fu...

27 days ago | 0

Answered
PDE Model Boundary Conditions
If you output state.x and state.y in the function, you can see to which evaluation points state.u belongs.

28 days ago | 0

Answered
How to supply Hessian for interior-point in fmincon in the objective function and not a separate function
I didn't think until the end, but maybe this procedure also helps in your case: https://uk.mathworks.com/help/optim/ug/objectiv...

28 days ago | 1

Answered
optimising a parameter not directly involved in the objective function to be minimised
t_exp = ...; Cb_exp = ...; % experimental data KA =...; KV =...; p =...; D =...; Cs =...; mo =...; Ni =...; V =...;...

28 days ago | 1

Answered
Monte-Carlo Analysis of fmincon optimization is converging to infeasible point
I guess log((MC(1) - x(7)) becomes complex-valued because MC(1)-x(7) becomes negative. Complex-valued constraints have to be avo...

28 days ago | 0

| accepted

Answered
Solving system of coupled nonlinear discretized equations with fsolve using boundary conditions
Use "bvp4c". Additionally, I don't understand why you set F(z,1)=(N_H2O(z+1)-N_H2O(z-1))/(2*dz); F(z,2)=(N_H2(z+1)...

28 days ago | 0

| accepted

Answered
I want to solve the Lyapunov equation with matlab
You can also do it this way, but your system does not seem to have a solution: % Définition des matrices du système A = [0 1;0...

29 days ago | 0

Answered
When I test this code which is shown below. I got an error of " not enough input arguements". How can i solve this error?
ga will call your function "power_flow_cap" with one input argument. Your function has three inputs (capsz,ncap,capplc). I don'...

29 days ago | 0

| accepted

Answered
How to perform correct numerical integration of equations containing Bessel functions ?
I suspect you want exp(-zeta^2/(4*0.0277)) instead of exp(zeta^2/(4*0.0277)) in your integrand. And why do you add the same Bes...

29 days ago | 0

Answered
Trouble with fmincon - minimizing a vector
The appropriate objective is to minimize -sum(similiarityvalues.^2)

29 days ago | 1

| accepted

Answered
Get solution for a linked multi-stage BVP
How do I model this problem? By solving it as a multipoint boundary value problem: https://uk.mathworks.com/help/matlab/math/s...

29 days ago | 0

| accepted

Answered
Boundary Value Problem based on specific problem
x(0) = 0 gives C1 = 0, x'(0) = 0 gives C2 = 0. Thus the solution of your equation is x = 0 for all t.

29 days ago | 1

| accepted

Answered
odeToVectorField takes forever to run
Are you sure you want to differentiate with respect to functions of t (like theta1, theta1_dot, theta2_dot) ? drn1 = diff(r1,th...

30 days ago | 0

Answered
Solve second-order ODE with Robin boundary condition
syms x y(x) A B C a b dy = diff(y,x); eqn = diff(x^2*dy,x)-2*y == 0; cond1 = A*dy(a)+B*y(a)/a == 0; cond2 = A*dy(b)+B*y(b)/b...

30 days ago | 0

| accepted

Answered
I want to solve the Lyapunov equation with matlab
Use MATLAB's "lyap" or "dlyap".

30 days ago | 0

Answered
Is matlab able to solve a system of coupled PDE and ODE?
Setting c = 0 in "pdefun" deletes the time derivative of the respective equation and makes the equation an elliptic one. But y...

30 days ago | 0

Answered
graph is the not plotted as desired because of tolerance level
dydx(5) = (-t4./(1-1i.*H1)).*y(4); instead of dydx(5) = (-t4./(1-1i.*H1)).*y(3); in your function definition. I didn't look...

1 month ago | 0

| accepted

Load more