Answered
ode45 and additional parameters - Growth Equation
What you do above does not make much sense. The way you will have to proceed is to fit parameters b and k to the data from 1...

10 years ago | 1

Answered
I need to develop a code of one PDE using Lax Wendroff method.
Use hpde.zip from http://faculty.smu.edu/shampine/current.html Best wishes Torsten.

10 years ago | 0

Answered
How can I initialize time delay state space model
help dde23 https://de.mathworks.com/matlabcentral/fileexchange/3899-tutorial-on-solving-ddes-with-dde23 Best wishes Tor...

10 years ago | 0

Answered
How to fix a point using least squares curve fitting
Remove A from the list of free parameters and set it to A = y_fix - B*exp(C*x_fix) Then your function to be fitted read...

10 years ago | 1

| accepted

Answered
Calculate the distance between a point and all the others
Use "pdist". Best wishes Torsten.

10 years ago | 0

Answered
Why does it take forever to solve my optimization problem (using ode45 and fmincon)?
The main problem with your fitting is that the system is already in steady-state at t=8,8... . A second problem is that you only...

10 years ago | 0

| accepted

Answered
How do I rewrite this system of differential equations to be able to use ode23?
Subtract equation 3 from equation 2 to get an expression for wdot alone. Then insert this expression for wdot in equation 3 t...

10 years ago | 1

Answered
How to return values of algebraic variables of a dae system in ODE15s
Call "funcs" after integration has finished with the values of t and x for which you are interested in the algebraic variables a...

10 years ago | 0

Answered
i am getting an error while executing a short code to update a matrix, In an assignment A(I) = B, the number of elements in B and I must be the same. Er
You mean A=[0 1 1 1 ;0 0 0 1 ;0 1 0 1 ;0 0 0 0]; N=4; C=2; rho=0.1; B=zeros(N,N,C); a=[1 0;0 1;1 1;0 1]...

10 years ago | 2

Answered
Solving Non linear systems of equations issues
x=sqrt((R1*cos(TH1)-.54*cos(theta2))^2+(R1*cos(TH1)-.54*sin(theta2))^2) y=acos((R1*cos(TH1)-.54*cos(theta2))/sqrt((R1*cos(T...

10 years ago | 0

Answered
find the probability that the mean is between a and b
The probabiliy is 1 since the arithmetic mean of n numbers between a and b is also between a and b. Best wishes Torsten.

10 years ago | 1

Answered
Error using sym/subindex (line 769) for a taylor series expansion?
You forgot to define x as a symbolic variable. Best wishes Torsten.

10 years ago | 0

Answered
I am getting error codes whilst using ODE45 and I am not sure what to do.
Try this: function main ainit=[0.3 ; 0.2]; t_start=0; t_end=100; [t,a]=ode45(@fun,[t_start, t_end],ainit); ...

10 years ago | 0

Answered
integration using Legendre elliptical function
f=@(k)ellipke(k^2/(k^2-1))/sqrt(1-k^2) Best wishes Torsten.

10 years ago | 0

| accepted

Answered
How to multiply two matrices with nested for loops ?
A=rand(n,p); B=rand(p,m); C=zeros(n,m); for i=1:n for j=1:m C(i,j)=0.0; for k=1:p C...

10 years ago | 0

| accepted

Answered
How to integrate a highly oscillatory function
You can't prove divergence of this integral using numerical methods. Try analytical methods instead (e.g. show that the funct...

10 years ago | 0

Answered
Solving A System of Equations Using ODE45
You have two coupled ODEs for V_p and x. If you want to apply numerical methods (ODE15S, e.g.) for the solution, I don't see a p...

10 years ago | 0

| accepted

Answered
error when plotting function
Did you read the documentation ? a1=...; a2=...; a3=...; a4=...; b1=...; b2=...; b3=...; b4=...; c1...

10 years ago | 0

| accepted

Answered
Can't solve integrate with unknown value
Use "int" instead of "integral" for symbolic calculations. Best wishes Torsten.

10 years ago | 0

Answered
Trying to solve a system of 2 ordinary differential equations with boundary conditions
I doubt that your system can be solved analytically using dsolve. Try a numerical solution with bvp4c. If you start at t=0...

10 years ago | 0

Answered
Calculating the CDF from a sample set?
https://de.mathworks.com/help/stats/ecdf.html https://de.mathworks.com/help/stats/cdfplot.html Best wishes Torsten.

10 years ago | 0

Answered
Need help with solving differential equation using multiple initial values!
http://de.mathworks.com/matlabcentral/answers/312504-underwater-soundwave-for-different-starting-angles Best wishes Torste...

10 years ago | 0

| accepted

Answered
Fitting an equation with x,y variables and b, d constant.
Use lsqnonlin and define the functions f_i as f_i = 1/a*(b-ydata(i)).^1.5-log(d./xdata(i))+0.5*log(1-ydata(i)/b) Best wi...

10 years ago | 0

| accepted

Answered
ode45 is causing an infinite loop
Separate the two parts of your code: function main c0 = zeros(10, 1); x_teabag = 0.04; y_teabag = 0.0075; z_...

10 years ago | 0

Answered
Apply Gauss Quadrature formula to the following equation
You are supposed to evaluate 5*sum_{i=1}^{i=n} w_i*f(5*x_i+5) with f(x) = g*m/c*(1 - exp(-(c/m)x)) for n = 2,3,...

10 years ago | 0

Answered
Get variable out of ode 45
Try the suggestion under https://de.mathworks.com/matlabcentral/answers/92701-how-do-i-pass-out-extra-parameters-using-ode23-...

10 years ago | 1

Answered
Underwater soundwave for different starting angles
What about x=0:0.5:6076*25; n=-10; for i=1:25 [X,Z]=ode45(@(x,z)undervatten(x,z,n),x,[2000 tand(n)]); Z_arr...

10 years ago | 0

| accepted

Answered
Solving for a missing column
Let a=[25451;1901512;265214;356108;707500;24544;462430;24410]. Then your problem is equivalent to the following formulation w...

10 years ago | 0

Answered
how can i solve si 1 and si 2 as system of differential equations in matlab?
Split si 1 and si 2 into real and imaginary part and solve the four ODEs for real(si 1), imag(si 1), real(si 2), imag(si 2) usin...

10 years ago | 0

Answered
I'm having a little trouble solving these three equations for 4 unknowns in MATlab:
syms Xq1 Xq2 Xd1 Xd2 Xc Xmd Xmq E Iq1 Id1 Id2 Iq2 S=solve([Xd1*Id1+Xmd*Id2+E==0,-Xq1*Iq1-Xmq*Iq2==0,Xd2*Id2+Xmd*Id1+E-Id2*...

10 years ago | 0

| accepted

Load more