Answered
Triple intergral for the array valued function
N = cell(2,3); N{1,1} =@(x,y,z) x.^2+y.^2+z.^2; N{1,2} =@(x,y,z) x.^2+y.^2+z.^2; N{1,3} =@(x,y,z) x.^2; N{2,1} =@(x,y,z) y....

18 dagar ago | 0

Answered
does "generalized Neumann" boundary condition include actual Neumann boundary condition?
Is there maybe a workaround (like change of variables) to solve these problems? No. All Neumann boundary conditions are related...

18 dagar ago | 0

| accepted

Answered
Graphing 1D Diffusion in 2 Compartments - Possible Issue with ODE solver
In my opinion, you have the following conditions at the interface x = h_D: (1) D_D*dC_D/dx = D_R*dC_R/dx (2) C_R = phi*C_D (or...

19 dagar ago | 0

Answered
I want to optimize an ODE system of equations with constraints
I ran your code with k in the order of 0.1,1 and 10, but it seems the k-values have amost no influence on the result of the inte...

19 dagar ago | 0

| accepted

Answered
Solving edge-value problems with unknown intervals
Define a dimensionless variable x' = x/l1 and transform your equation to the form dY/dx' = ... which has to be solved in [0 1]. ...

19 dagar ago | 1

Answered
How to calculate a composite triple integral with exponential function?
Setting l, r and s to zero will cause problems because you divide by these variables. But also changing integral2(@(s,l)array...

19 dagar ago | 0

| accepted

Answered
Error using lsqncommon Lower and upper bounds not supported with complex-valued initial function or Jacobian evaluation.
If you use "fmincon" and (f(x,xdata)-ydata)' * (f(x,xdata)-ydata) as objective function, complex numbers don't matter because th...

20 dagar ago | 0

| accepted

Answered
Solve a complex differential equations system
The main problem with your equations is that they involve a term that has to be evaluated at a boundary point. Otherwise, you co...

20 dagar ago | 0

Answered
an ode with arguements
You have to define your vector of solution variables as y(1) = f, y(2) = f', y(3) = f'', y(4) = T, y(5) = T' and your function...

20 dagar ago | 0

Answered
How to invert a square matrix using Gaussian elimination
The newton update is x_(n+1) = x_n - Df^(-1)*f, not x_(n+1) = x_n + Df^(-1)*f. But you should not explicitly compute the ...

21 dagar ago | 1

Answered
Find Eigenvalues of ODE45 Solution MATLAB
Your system reads z1'= z2 z2' = ( F-(c1+c2)*z2-( ((k1*gamma1+k2*gamma2)*z1^2+k1+k2)*z1+(-k2*gamma2*z1^2-k2)*z3 ) )/m1 z3' = z...

21 dagar ago | 1

| accepted

Answered
How to get an expression for a Hypergeometric function with symbiotic variable
MATLAB is not able to find the Inverse Laplace transform of such a complicated function as an analytic expression.

21 dagar ago | 0

| accepted

Answered
can someone please help me coding this saturation equations in matlab
m, umax and u have to be defined previously. psi = zeros(m,1); idx = abs(u) > umax; psi(idx) = sign(u(idx)).*min(abs(u(idx)),...

21 dagar ago | 0

| accepted

Answered
variable problem of GA
t=[0.015 0.01 0.009 0.012 0.016 0.014 0 0]; w=[0.005 0.004 0.003 0.004 0.006 0.004 0 0]; options = optimoptions( ... 'ga'...

21 dagar ago | 0

| accepted

Answered
fmincon solution does not differ from initial guess if I provide gradient
Use SpecifyObjectiveGradient Gradient for the objective function defined by the user. See the description of fun to see how to...

21 dagar ago | 0

Answered
When using integral function to calculate MeijerG function, Matlab will get stuck.
meijerG has a division by 0 at SNR = 0. If you are sure the integral exists at SNR = 0, start with a small value > 0, e.g. aver...

22 dagar ago | 0

| accepted

Answered
Set answers of first BVP as new boundary condition for second BVP
"value_at_1" is defined in the script part of your code, but it's not automatically visible in the functions you define. Either ...

22 dagar ago | 0

Answered
lsqcurvefit can't get to the right values
It seems that a variation of your parameters has almost no effect on epsilon_equation. This makes lsqcurvefit assume it cannot m...

23 dagar ago | 0

Answered
cumprod fuction in GA
Note that Nb was not defined in your code - I added it to the known arrays. rng("default") t=[0.015 0.01 0.009 0.012 0.016 0.0...

24 dagar ago | 0

| accepted

Answered
cumprod fuction in GA
Your call to ga is wrong: x(1), x(2) and x(3) do not belong there, idx is undefined, lb and ub have 2 elements instead of 3, [...

24 dagar ago | 0

Answered
if number of steps is not multiple of 3 how to do simpsons 3/8 rule? why im getting more error in simpsons 3/8 rule than in simpsons 1/3 rule?
if number of steps is not multiple of 3 how to do simpsons 3/8 rule? The 1/3 rule can be used for the remaining subintervals wi...

26 dagar ago | 0

| accepted

Answered
showing error " Array indices must be positive or logical values"
lambda=sigma.*a.*((sqrt(1+32.*theta.*r)./(sigma(i).*a))-1) instead of lambda=sigma.*a((sqrt(1+32.*theta.*r)./(sigma(i).*a))-1)...

26 dagar ago | 1

Answered
how to format the codes to compute the differential-algebraic equations using ode15s?
I don't see a way to use a MATLAB ode integrator to solve your system. Take a look at http://www.unige.ch/~hairer/software.htm...

26 dagar ago | 0

Answered
How to write a Matlab code for a sequence of functionals and their minimums
Your code: number_of_iterations = 3; A = @(alpha) ...; % Your NxN matrix A depending on alpha u = ...; % Your Nx1 ...

27 dagar ago | 0

| accepted

Answered
change the value of a parameter Lambda at each time step
% Experiemental data on 12 months time = 1:12 ; % experimental time 12 months Yc = [20 18 19 24 28 26 25 24 20 1...

27 dagar ago | 0

| accepted

Answered
Symbolic solution is too long
Did I take the wrong approach in solving this system of differential equations? It depends on what you want. If you want a gen...

27 dagar ago | 0

Answered
Solve function is unable to find an explicit solution
If you only want one possible solution, use x = solve(f,[T,L]) If you remove your assumptions, you get the general form of the...

27 dagar ago | 0

Answered
How can I fix "Index in position 2 exceeds array bounds" in for loop?
When you set b = a(1,1) , a is undefined in your code from above. Further, b is a scalar value, namely b = a(1,1). When you ...

27 dagar ago | 0

Answered
How can I analyze the sum and product together in a code?
rng("default") N = 10; mu = 1; alpha = rand(1,N); alphap = cumprod(alpha); fak = factorial(0:N); terms_numerator = alphap....

27 dagar ago | 0

Answered
Couple ODE System not enough Input arguments, Why?
If all boundary conditions are given at x = 0 as in your case, you have an initial value problem instead of a boundary value pro...

27 dagar ago | 1

Load more