Answered
How to use "raise to the power" function in matlab
Jn(icounter) = sqrt(Lxn_dash^2 + mxn_dash^2 + nxn_dash^2)

8 years ago | 0

Answered
Can anyone tell e why I am getting NaN as the answer of this code. (the code is attached with this question for your kind reference.)
For t=1, K11=0. This causes abs(Y2(t)+H*K11) to become zero. This turns (Y2(t)+H*K11/abs (Y2(t)+H*K11) into a NaN . Best wish...

8 years ago | 0

| accepted

Answered
How to slove non polynomial complex equation in Matlab?
Try assume(phi2,'real') assume(phi3,'real') Best wishes Torsten.

8 years ago | 0

Answered
MATLAB solving BVP using bvp4c
If h' = y', try function main init = bvpinit(linspace(1,15,10),[0,0,0]); sol = bvp4c(@rhs_bvp, @bc_bvp, init); x =...

8 years ago | 0

| accepted

Answered
How to fix: Index exceeds array bounds?
[at,I,ate,aIe,aie] = ode45(Ifcn, [t(end) tend], 0, opt) implies that you have only *one* ODE to solve, but in ZustandI, you...

8 years ago | 1

| accepted

Answered
How can I plot a periodic signal f(t)= t.^3 , -pi<=t<pi over interval -2*pi<=t<=2*pi
x = linspace(-2*pi,2*pi,1000); y = (mod(x+pi,2*pi)-pi).^3; plot(x,y)

8 years ago | 0

| accepted

Answered
How to solve multi-variable system of ODEs
[t z] = ode45(@(t,z)g(t,z,gamma1,gamma2), [0 200], [y1_0 y2_0 x1_0 x2_0]); function dz = g(t,z,gamma1,gamma2) y = z(...

8 years ago | 0

| accepted

Answered
Integrating function from lower to upper limit getting NaN in return
cov22(ii) =((2*pi*lambdaS)/A2)*integral2(cov2,0,inf,@(x)P1*x,inf)

8 years ago | 0

Answered
How can i find the minimum between 0 and the value in the row?
r = subplus(r) - r;

8 years ago | 0

Answered
Solving differential equation with ode45
func=@(t,y)(y-1)^2; tspan = [0 10]; for x = 0.01:0.05:1 y0 = x; [t,y] = ode45(func,tspan,y0); plot(...

8 years ago | 1

| accepted

Answered
Take the mean over multiple points in plot
mean(reshape(y,2,numel(y)/2))

8 years ago | 0

Answered
Estimation of parameters and initial conditions using lsqcurvefit gives an error message :"Index Exceeds Array Bounds"
In [tSol,eqns] = ode15i(F, [600, 183000], b0, bp0, opt); you must specify the *complete* vector "ExperimentalTime", not...

8 years ago | 0

Answered
Curve Fitting for an equation
function main xdata = [...]; % x coordinates of your 12 point ydata = [...]; % y coordaintes of your 12 points x0...

8 years ago | 0

| accepted

Answered
If I change absolute and relative errors in a ode solver does that affect the convergence of the solution?
*How do you check for convergence of an ode solver output?* You can't. Convergence checks are done by the solver. *Can I d...

8 years ago | 1

Answered
How to plot3 using 3 equations
r0=10.0; z0=1.0; a=0.1; nu=1.0; Gamm_inf=1000; t=0:0.05:10; z=z0*exp(2*a*t); r=r0*exp(-a*t); w=a*r.^2/...

8 years ago | 1

| accepted

Answered
The expression to the left of the equals sign is not a valid target for an assignment in an if statement
if Data(k).subData(m)== 5 difficultyFive(m) = Data(k).subData(m); else difficultyFive(m) = 0; end

8 years ago | 0

Answered
How to plot ODE function and I don't get this plot.
Solve the ODEs using ODE45, e.g., and use "plot3" for the plot. Best wishes Torsten.

8 years ago | 0

| accepted

Answered
What could be the issue if a global variable gets an error "Undefined function or variable 'F_FEED' " when called from a function. The global variable is defined in the file from which the function is called.
Maybe you mean function main global F_FEED T0 P0 WEIGHT_cat R Ua F_G0 F_H2O0 F_N20 F_A0 F_AC0 F_AA0 F_FA0 F_T0; F_...

8 years ago | 0

| accepted

Answered
Parameter estimation when solving DAE using ODE15i solver
Here is a link to the reference application: https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fi...

8 years ago | 0

| accepted

Answered
How do I integrate the output of an ode23 solver?
Solve the additional ODE dI/dt = E(t)*dr/dt then I(T) = integral_{t=0}^{t=T} E(t) dr Best wishes Torsten.

8 years ago | 0

Answered
Uncertainty in using fsolve correctly
This is not an error message, but the message that "fsolve" solved your problem. Nevertheless, you should change if a<=1...

8 years ago | 1

Answered
Error:'Assignment has more non-singleton rhs dimensions than non-singleton subscripts' in ODE parameter estimation
1. The number of elements in yDataC and yhat must be the same. 2. In model, dydt must be a column vector, not a row vector. ...

8 years ago | 0

Answered
I want to use a ist order differential equation for moving a coordinate point to another .how can i do it?
(x(t),y(t)) = (0,3) + (4*t,2*t), t in [0;1] Now differentiating gives dx/dt = 4, x(0) = 0 dy/dt = 2, y(0) = 3 Be...

8 years ago | 0

| accepted

Answered
Optimisation of parameters in a PDE
https://de.mathworks.com/matlabcentral/answers/406938-fitting-the-numerical-solution-of-a-pde-with-one-parameter-to-some-data ...

8 years ago | 0

Answered
How would I solve a Laplace Equation using the FDM method?
Solve A*V=b where A, b result from the system of equations V(1) = V0 (V(i+1)-2*V(i)+V(i-1))/h^2 = 24*x(i) (i=2,...,Nx) ...

8 years ago | 0

Answered
By what I can replace randint() function.
r = rand(1,1); k = min(floor(10*r),9)+5

8 years ago | 0

| accepted

Answered
How to solve this equation?
fun=@(i)400000000*(1+i)^-1+500000000*(1+i)^-2+760000000*(1+i)^-3+200000000*(1+i)^-4+140000000*(1+i)^-5+3105237.5*((1+i)^46-1)/...

8 years ago | 0

| accepted

Answered
I want to program (solve this equation for h) this problem in Matlab but I do not know the appropriate function to use.
h can be explicitly solved for: par.Vp = 26.01; m_Lp = 24973; hss =0.96; par.Alpha_Lp_av = pi/180; par.theta = ...

8 years ago | 1

| accepted

Answered
Error using pdepe (line 293) Spatial discretization has failed.
Try function Kronstadt_HW4_problem3_pdepe %This is a dimensional formulation close all Nx=201; ...

8 years ago | 2

| accepted

Answered
A PDE equation giving meaningless results
Try function main % simple PDE % Equation: dC/dt = K * d^2C/dx^2 - kr * C % IC: C0 = 0.762471166 ...

8 years ago | 0

| accepted

Load more