Answered
Inner matrix dimensions must agree. my code is giving this error , can someone help me fix this
Use P = (-1i*conj(E1).*E1.^2.*w1*deff)/(c*n2*Dk)+ 1i*2*pi*(n2*I0)*(Lnl/L)*((abs(E1)).^2).*E1 +... + 1i*4*pi*(n2*I0)*...

8 years ago | 0

| accepted

Answered
How to replace ode45 with Eulers method?
... % Solve differential equations using ode45 [t,y] = euler(@FNode,tSpan,y0,K); ... function [tsol, ysol] =...

8 years ago | 0

| accepted

Answered
Error in non-linear regression
t = readtable('ban1.csv') sea = t(:,2) sst = t(:,3) at = t(:,4) A = [ones(numel(sea),1),sst,at]; rhs = sea; ...

8 years ago | 0

Answered
Provide gradient for fmincon when the function to minimize uses ODE
Look up "sensitivity equations for ordinary differential equations". The solution of these equations give you the derivative ...

8 years ago | 0

Answered
I would like know if there is a function inverse for calculate DHT^-1
DHT^-1 = 1/N * DHT https://en.wikipedia.org/wiki/Discrete_Hartley_transform Section "Properties".

8 years ago | 0

Answered
Solving non-homogeneous differential equation
Take a look at the example "ODE with Time-Dependent Terms" under https://de.mathworks.com/help/matlab/ref/ode45.html ...

8 years ago | 1

Answered
How can I solve the mass balance with both dependence time and space?
Solution is C(z)=5, if z<=t*v, C(z)=0 else.

8 years ago | 0

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

Load more