Answered
Code using Curve Fitting Toolbox with Customized Function
You can supply an arbitrary anonymous function as fittype: http://de.mathworks.com/help/curvefit/fit.html#bto2vuv-11 Best ...

10 years ago | 0

| accepted

Answered
how can I determine the number of terms in taylor polynomial with tolerance using while loop ?
1. n is not initialized 2. while te<tolerance must read: while te>tolerance. Thus initialize te=1, e.g. 3. Use "in...

10 years ago | 0

Answered
urgent help please :::::( how can ı solve this ?
sigma is (2x2) and randn(1000,2) is (1000x2), so sigma*randn or sigma.*randn are not defined. Best wishes Torsten.

10 years ago | 0

Answered
A problem related to Linear Programming. Help me to formulate a linear program from the Summation notations of the objective and constraints of the program.
There is no other way than to set up each variable separately. Look at the SUDOKU example provided under http://de.mathwor...

10 years ago | 0

Answered
Central difference approximations to estimate a Jacobian matrxi
J(1,1)=(F(x+h,y)-F(x-h,y))/(2*h); J(1,2)=(F(x,y+k)-F(x,y-k))/(2*k); J(2,1)=(G(x+h,y)-G(x-h,y))/(2*h); J(2,2)=(G(x,y+k...

10 years ago | 1

Answered
Error with ode23
Tc=60/72; Ts=(2/5)*Tc; R=1.05; C=1.066; I0=45*pi/Ts; P_ss2=80; for n=1:5 func=@(t,y)(-y/R+I0*sin(pi*(t-...

10 years ago | 0

| accepted

Answered
Error with ode23
Mixing of symbolic and numeric variables is not allowed when using ode23: z2 must be a function handle of a purely numeric expre...

10 years ago | 0

Answered
function hygepdf is giving the wrong result. It has a hyperbolic probability output rather than a continuosly increasing probability.
Write down the pdf and you'll see that it's symmetric around K=50. Best wishes Torsten.

10 years ago | 0

Answered
Non linear system with parameters
mpy=...; nel=...; meo=...; mp=...; func=@(x)[0.67*x(1)-mpy+89.4969*(1-exp(-0.00186*(mp-x(1))))+203.8*(1-exp(-0.014...

10 years ago | 0

Answered
How can I update initial guess for Newtons algorithm inside a ODE45 function for the next step?
Don't solve for yPa the way you do. Include the algebraic equation for yPa in the system of ODEs. The result is a system of D...

10 years ago | 0

| accepted

Answered
Second Order, Piecewise ODE help
Does this work ? T=vertcat(T1(1:end),T2(2:end),T3(2:end)); Y=vertcat(Y1(1:end,1),Y2(2:end,1),Y3(2:end,1)); plot(T,Y:,...

10 years ago | 0

Answered
Estimating two parameters for curve fitting (Monod Kinetics)?
http://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting Best wishes Torsten.

10 years ago | 0

Answered
ode15s ERROR!!! please help me
[tOut,xSolution] = ode15s(@(t,x)f_ASM(t,x,parameters),vTime,x,optionsODE); Best wishes Torsten.

10 years ago | 1

Answered
Using Levenberg-Marquardt method with matlab
Any constraints on h ? If not, the obvious solution is h=0. Best wishes Torsten.

10 years ago | 0

Answered
How can I implement this PDE system ?
I think a good starting point are the Euler equations of fluid dynamics. In 1d, a well-written code to solve them is CLAWPACK...

10 years ago | 0

| accepted

Answered
How to find solution for Blasius Equation?
plot(xint,Sxint([2 2],:)); plots y(2) over [xa xb]. I don't know why you or the author of the code does not simply use ...

10 years ago | 0

| accepted

Answered
How can I solve an ODE that involves a variable parameter?
The actual value of z is transfered to the function where you define your differential equation. Thus you only have to evaluate ...

10 years ago | 0

Answered
Second Order, Piecewise ODE help
fun=@(t,y)[y(2);-4*y(1)]; y0=[0 0]; tspan=[0 5]; [T1,Y1]=ode45(fun,tspan,y0); fun=@(t,y)[y(2);-4*y(1)+(t-5)/5; ...

10 years ago | 0

| accepted

Answered
How can I fit a curve where integration of a function is involved?
Add the lines ydata_sim = fun2(y); plot(xdata,ydata,xdata,ydata_sim) at the end of the code. Best wishes Torste...

10 years ago | 0

Answered
How do I use dsolve within a for loop?
Maybe syms f(x) for n=1:5 DE{n} = dsolve((2+x.^3)*diff(f,2) - x*diff(f) + n*f, f(-1) == (-1)^n, f(1) == 1); en...

10 years ago | 0

Answered
Attempted to access demn(15); index out of bounds because numel(demn)=6.
Your array "demn" has 6 elements, but in your "while" construct, you try to access demn(15) which does not exist. Best wishes...

10 years ago | 0

Answered
inpolygon help to find number of integer points
You only consider points (xq,yq) which have the same x- and y- coordinate. This will give you a wrong answer. Use meshgrid...

10 years ago | 0

| accepted

Answered
How to solve a 3 ODEs with 1 vector input and constant parameters with 3 initial conditions parameters
Wc=3*Rac*Ic.^2; % conductor losses Ws=0; % screen losses assuming 0 % Initial conditions in Kelvin degrees Te0=0+273....

10 years ago | 0

| accepted

Answered
Coupled partial differential equation and two ordinary differential equations
Are you sure about the second-order time derivatives ? Or did you mean du1/dt and du2/dt ? In any case: I'm not aware of any ...

10 years ago | 0

Answered
What is an effective way of solving u_t+u_xx+u_x+f(u)=0
The easiest way is to use MATLAB's pdepe. Best wishes Torsten.

10 years ago | 0

Answered
How can I fit a curve where integration of a function is involved?
function fitting xdata = [...]; ydata = [...]; fun=@(x,xdata,A,B)exp(-A*x.^2.*log(B+x)).*cos(xdata*x); fun2=@(y)in...

10 years ago | 0

Answered
How to integrate a 2D function over a grid without for loops?
Why not using the analytical integral ? Solution is q(j,i)=(pi/2*sigma^2)^2*(erf((mux-(i+0.5))/(sqrt(2)*sigma))-erf((mux...

10 years ago | 1

Answered
Ode45 error: Unable to meet integration tolerances without reducing step size below the smallest value allowed
Integrating up to t=0.68, my plot of the solution clearly indicates a singularity in the solution for y(2). Best wishes To...

10 years ago | 0

Answered
MILP-error with constraints
x = intlinprog(f,intcon,[],[],Aeq,beq,lb,ub); Best wishes Torsten.

10 years ago | 0

| accepted

Answered
How to integrate x*f(x) in Matlab? f(x) is normal distribution density function.
Hint: Integration by parts. Best wishes Torsten.

10 years ago | 2

Load more