Answered
Define optimization objective independently of the dimension
Write your objective as (x*A-y).'*(x*A-y) + 1/6*(x*B-z).'*(x*B-z) and expand. I get [A.', B.']*[x.'*x, 0; 0, 1/6...

8 years ago | 1

Answered
Volume and Area under a fit curve
Yfun = @(x)pi*p(x).^2; volume = integral(Yfun,8,230) where p is the object returned from "fit". Best wishes Torste...

8 years ago | 1

| accepted

Answered
Solving overdetermined equation with constraints.
Use the variables squared in the equations for which you want to get positive solutions. Best wishes Torsten.

8 years ago | 0

| accepted

Answered
Is it possible to solve this equation symbolicaly with Mupad?
No experienced person will try to solve such a complicated equation symbolically - and obviously MUPAD cannot return an explicit...

8 years ago | 0

Answered
How to make ode15s not to cross zero?
Tighten the tolerances RelTol and AbsTol, e.g. opts = odeset('RelTol',1e-8,'AbsTol',1e-8); Best wishes Torsten.

8 years ago | 0

Answered
Find zeros in interval
f=@(x)integral(@(t)exp(-(t/x).^2),-1,1)-1.5; sol=fzero(f,[0.5,2])

8 years ago | 1

| accepted

Answered
How can I write the taylor series expansion for the function (1+x^2)^(-1/2) in code
a0 = 1 an = -a(n-1) * (2*n-1)/(2*n)

8 years ago | 0

| accepted

Answered
find numerical solution of a function
f0=...; R=...; alpha=...; C0=...; gamma0=...; r=...; L=...; beta=...; omega=...; yourFunction = @(V...

8 years ago | 0

Answered
Numerical Integration at different point
I0_dBm=-12:22; for jj=1:length(I0_dBm) var_ni=@(g)(6.09*10^-10*(10^(I0_dBm(jj)/10))*g)+(8.28*10^-14); fun...

8 years ago | 0

| accepted

Answered
symbolic Integration issue while solving differential equation
Seems the solution to your differential equation is given by this integral, but MATLAB is not able to find an analytical express...

8 years ago | 0

Answered
Accuracy of the first derivative with ode45
The most accurate method is to use the derivatives you set by yourself in the function routine that ODE45 calls (the dydt(i) val...

8 years ago | 2

Answered
Solution diverges for 1D heat equation using Crank-Nicholson
%This program is meant to test out the Crank-Nicolson scheme using a simple %nonlinear diffusion scheme. n=5000;m=150; ...

8 years ago | 0

Answered
Negative concentrations solving nonlinear coupled PDEs with pdepe
Then f1 = frac*diff1*DuDx(1) + v*(1-frac)*u(1); instead of f1 = frac*diff1*DuDx(1) + v*(1-frac); in pdex4pde ...

8 years ago | 0

| accepted

Answered
help with bvp4c error
function test() x_global = linspace(0,4,11); Gx_global = [0 0.4 0.8 1.2 1.6 2 2.4 2.8 3.2 3.6 4] solinit = bv...

8 years ago | 1

| accepted

Answered
ODE45 with a vector input
The example "ODE with Time-Dependent Terms" under https://de.mathworks.com/help/matlab/ref/ode45.html should show you h...

8 years ago | 2

| accepted

Answered
Facing problem to solve convection-diffusion equation
On the right-hand side of the equation C(i,j+1)=C(i,j)+(((s-p)*C(i+1,j+1)+(s-p)*C(i+1,j)... you refer to elements C(.,j+...

8 years ago | 0

Answered
First-order optimality of system of non-linear equations is not converging to 0
There is no unique solution for your equations. Choosing w1 = a w2 = a + 724/3735 w3 = a + 1458/3735 w4 = a + ...

8 years ago | 1

| accepted

Answered
how do i use BVP4C for these kind of coupled odes?
Can you solve C2*a + C4*b = -C1*p(x) - C3*u(x) C6*a + C8*b = -C5*p(x) - C7*u(x) for a and b ? If this is the case,...

8 years ago | 0

| accepted

Answered
Runge-Kutta - Plot Graphic - Help
Can you plot Tr versus t ? Then you should also be able to plot Tr-(Tr-Tcw1)*exp(-UA/(mcw*Cp)) versus t. Best wish...

8 years ago | 1

Answered
Optimized solution for a function with two integrals which depend on each other
Use "integral2" instead of "integral". Best wishes Torsten.

8 years ago | 0

| accepted

Answered
fitting using fitnlm with bounded parameters
It's not necessary to include bound options for your problem. "phase" can be easily adjusted to lie between 0 and 2*pi, and "...

8 years ago | 1

| accepted

Answered
How can i take the Jacobian of a function
function main x = [5 7] b = [2 3] h = numerical_jacobian(@qn,x,b) end function df=numerical_jacobian(f,...

8 years ago | 1

| accepted

Answered
How can I make this program run, it was copied from a text book, but it still has errors= line 3(bdown =firwd(159,1,2,...).. I changed line 3's firwd to fir, and it was till wrong Please help.
The code for "firwd" is in the same book at the end of the chapter where you found the code from above. Best wishes Torste...

8 years ago | 0

Answered
Numerically integrating a symbolic equation in a for loop?
In the definition of "R" and "thetadot", you use "k1" instead of "k1(i)".

8 years ago | 0

Answered
How to store loop results where loop does not have whole numbers only
y = 10; A = zeros(1,5); iCount = 0; for n = 4:0.5:6 iCount = iCount + 1; A(iCount) = n * y end

8 years ago | 0

Answered
I'm trying two solve two ode using ODE 45 ,But it shows some error,How to call multiple functions in ode 45?
w0=[w10;w20]; [t,w]=ode45(@ODE,T,w0); w1=w(1); w2=w(2); 1st possibilty: function dx=ODE(t,w) ...

8 years ago | 0

| accepted

Answered
I'm trying two solve two ode using ODE 45 ,But it shows some error,How to call multiple functions in ode 45?
Put the two ODEs in one function, not in two. Or use one driver function "ODE" to be called by the integrator and call "ODE1"...

8 years ago | 0

Answered
Fitting the numerical solution of a PDE with one parameter to some data
https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting The procedure can easily be adapted to w...

8 years ago | 0

| accepted

Load more