Answered
Solving 2nd order linear ode - wave equation - the solution at final values overshoots diverging from theoretical solution
Numerical problem. If you choose the product "2*pi*freq*mu_0*sigma_bulk" to be one power of ten less (e.g freq = 15e8 instead...

8 years ago | 0

Answered
Errors in objective function
function main xdata=1:30; ydata=[0,0,0,37248,58649,85974,132620,200698,266406,325423,383975,443234,498503,558777,612881,...

8 years ago | 0

| accepted

Answered
All zeros result when concatenating a complex vector with its conjugate
aux_P = P; frameSize=2048; P = zeros(15251,frameSize); P = [aux_P, flip(conj(aux_P),2)]; works for me.

8 years ago | 1

| accepted

Answered
Need Help to Plot confidence Interval For the following Code
https://de.mathworks.com/help/curvefit/confint.html

8 years ago | 0

| accepted

Answered
Having problems with ode solution
Use [t,y] = ode15s(@(t,y)Mechanism(t,y,E,K,k), tspan, S, options); instead of [t,y] = ode15s(@(t,y)Mechanism(t,S,E,...

8 years ago | 1

| accepted

Answered
How can I delete the imaginary part of an array?
C(C~=real(C)) = NaN;

8 years ago | 1

Answered
How do I plot heat transfer coefficient (h) against values not used in the equation?
Pr = 7.02; Re = 5000:20000; Nu = 0.9553*Pr^0.4*Re.^0.5; D = 0.897e-3; k = 0.6; h = Nu*k/D; plot(Re,h)

8 years ago | 0

| accepted

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

Load more