Answered
How to solve second order inhomogeneous equations using ode45
fun=@(t,y)[y(2);(940*sin(10*pi*t)-47000*y(1)-497*y(2))/526.87]; Best wishes Torsten.

9 years ago | 0

Answered
I don't understand why This code doesn't work ----error
diC1= (((2*pi.*e0).*((R.^2).*(1-sin(th)))./((z).*(z)+R.*sin(th)))); Call1= 2*pi.*e0.*R.*log(1+R.*(1-sin(th))./z)+C00; Re...

9 years ago | 0

Answered
can i plot an equation with two variable?
https://de.mathworks.com/help/matlab/ref/fimplicit.html Best wishes Torsten.

9 years ago | 0

Answered
Can someone help with an optimization problem?
help linprog Best wishes Torsten.

9 years ago | 1

Answered
2D-BVP, with bvp4c loop and changing initial conditions
bvp4c only solves the BVP on a single x-slice of your rectangular domain. Thus you should proceed as follows: - Solve the ...

9 years ago | 1

| accepted

Answered
Curve fitting a power law function a(x^b) + C
Use lsqcurvefit. Best wishes Torsten.

9 years ago | 0

| accepted

Answered
How to stop ode45 using events function
function [value,isterminal,direction]=EndEvents(t,var) instead of function [value,isterminal,direction]=EndEvents(t,va...

9 years ago | 1

| accepted

Answered
fsolve Doesn't Recognize Input Variables
Ath=0.289; %Throat area (m^2) Ae=0.578; %Exit area (m^2) gamma=1.37; %Specific heat ratio ...

9 years ago | 2

| accepted

Answered
How can i solve this equation with for loop?
y = [1 4 5 6 8]; for g=1:1:numel(y) W1 = 15*y(g); W2 = @(x)x.^2+y(g); f = @(x) W1+W2(x)+y(g); ar=[-100...

9 years ago | 1

| accepted

Answered
How to code Taylor's series approximation of Error function? Is following code right? Please help
You must avoid to explictly calculate z^(2*n+1)/n!. For large n and ||z||>1, you'll get an infinity/infinity problem. Use...

9 years ago | 0

Answered
How can i use limit function and my function ?
f=@(x)exp(1) Best wishes Torsten.

9 years ago | 0

Answered
ODE45 giving error
"strain" must have the same number of elements as "e0". Is this the case for your code ? Best wishes Torsten.

9 years ago | 0

Answered
How to code Taylor's series approximation of Error function? Is following code right? Please help
Although the coding is not optimal, it looks ok. Why don't you just compare "ert(k)" and erf(z(k)) to get an answer to your ...

9 years ago | 0

Answered
Setting up ODE in Matlab for ODE 45 solver
function dydx = hw2_5(x,y) C(1) = y(1); C(2) = y(2); C(3) = y(3); T = y(4); % Constants A = 2.2e...

9 years ago | 1

| accepted

Answered
How to do numerical differentiation using Matlab?
Use symbolic differentiation: https://de.mathworks.com/help/symbolic/diff.html Best wishes Torsten.

9 years ago | 0

Answered
Problem with integration.
Try whether integration becomes easier if you write your function as cos(x)*(sqrt(1+a*cos(x))-sqrt(1-a*cos(x)))/(2*a) Be...

9 years ago | 0

| accepted

Answered
finding numerical integration of vectors
P = trapz(U,AU.*BU); where AU and BU are the vectors evaluated at U. Best wishes Torsten.

9 years ago | 0

Answered
Optimize a stochastic process using nlinfit
f=@(beta,x)model(beta,x,kexp,nbr,n) Best wishes Torsten.

9 years ago | 0

Answered
Using fminsearch to tiffing distribution
function main par0(1)=value1; par0(2)=value2; par=fminsearch(@(par)errorconv(par,mySignal),par0); func...

9 years ago | 0

| accepted

Answered
How do I solve this system of nonlinear coupled partial differential equations?
Typical problem for MATLAB's "pdepe". Best wishes Torsten.

9 years ago | 0

| accepted

Answered
It says Fzero isn't a function (SUPER SIMPLE CODE)
S=@(Y) 3*sin(Y)+Y-2; Best wishes Torsten.

9 years ago | 0

Answered
How to use linprog to maximize
Choose f=[0 0 -1]. Best wishes Torsten.

9 years ago | 2

Answered
ODE45 solving for first time
Take a look at the first example under https://de.mathworks.com/help/matlab/ref/ode45.html Replace "2*t" by "y(1)^4" Be...

9 years ago | 2

Answered
MAXDEPTH in solve system of algebraic equations
Use "fsolve" instead of "solve". Best wishes Torsten.

9 years ago | 0

| accepted

Answered
Pressure Swing Adsorption: Solve coupled partial differential equation system with ODE-Solver and Method of Lines
You need a second-order discretization in space to avoid these artificial diffusion effects. Take a look at http://www.nag...

9 years ago | 0

| accepted

Answered
How to use not equal to '~=' operator in if statement?
If user enters A, then x~=B is true, so (x~='A')||(x~='B') is true, thus "error" is displayed. Same for B. Best wishes ...

10 years ago | 0

Answered
Can some body explain to me the code for solve this problem of optimization?
k=(m/sigma)^2, lambda=m/sigma^2. There is no degree-of-freedom for optimization in the k-value. Best wishes Torsten.

10 years ago | 0

Answered
Index exceeds matrix dimensions when solving a system of ODEs
1. Your call to ODE45 has to be [T,Y]=ode45(@ebola, tspan, y0); 2. y0 is 1-dimensional while you return a 6-dimensional vec...

10 years ago | 1

Answered
Coupled PDE using PDEPE
The spatial coordinates in the two equations are different (r and z). Thus the problem is 2-dimensional. pdepe is not suited to ...

10 years ago | 0

Load more