Answered
Solving Boundary Value Problem in 2D
Interpret x as time(t) and y as length(x) and use MATLAB's "pdepe". Best wishes Torsten.

8 years ago | 0

| accepted

Answered
function handle how to apply to dsolve???
Use function handles if you want to integrate numerically, use symbolic expressions if you want to integrate symbolically. Be...

8 years ago | 0

Answered
The use of shooting algorithm to solve the second-order differential equations
The implementation of this problem in MATLAB is much more difficult than you did above. Here is a guideline: https://www2....

8 years ago | 0

Answered
How to find next number divisible by n
b = a + (n - rem(a,n)) Best wishes Torsten.

9 years ago | 0

| accepted

Answered
Results for eig function
Use format longE Best wishes Torsten.

9 years ago | 0

| accepted

Answered
Error in nested integration
fun1= @(y) y+ integral(@(x)fun(x,y), 0,1,'ArrayValued',true); Note that fun is undefined at y=0. Thus c1 should come out as...

9 years ago | 0

| accepted

Answered
How to solve a system of parabolic partial differential equations in time and 1 D space
One mistake in your settings: f = [k*DuDx(1) ; kG*DuDx(2)]; s = [(u(2)-u(1))*alph-cv*mdot/A*DuDx(1);(u(1)-u(2))*alph...

9 years ago | 1

| accepted

Answered
I want a code for solving a coupled 3rd order and 2nd order ode using shooting method and RK-4 numerical technique , please if anyone could help
Try function main global Pr k1 M lambda Pr=0.7; k1=0.1; M=1; lambda=0.1; rlow=0; rhigh=10; N=1000; op...

9 years ago | 0

| accepted

Answered
Probability airport question code.
function boarding %100 passengers %We assume that Frank's seat is seat 99, your seat is seat 100. %Further assume tha...

9 years ago | 0

Answered
sum calculation in matlab
If you define Z, S, T as numerical arrays, you can determine a and b as A = [-sum(S.*S) sum(S.*T);-sum(S.*T) sum(T.*T)]; ...

9 years ago | 0

Answered
Converting Matlab ode45 into C with complex output
*"the output data must be real when enforcing non-negativity...".* But you seem to use the non-negativity option of ODE45 whi...

9 years ago | 0

Answered
second order differential equation
function van = vandp(x,y) u = 0.1; %x(1) = 2; %y(1) = 1.5; van=-u*(x^2-1)*y-x; Best wishes Torste...

9 years ago | 1

Answered
Can MATLAB solve a integrodifferential equation?
u = 1/int(y*z,x,0,2*pi) Best wishes Torsten.

9 years ago | 1

| accepted

Answered
Ramp Rate constraint in Economic Dispatch using Linprog function
f = [1000 500 0 0 300]; %%Objective function A = []; b = []; Aeq = [1 1 1 1 1]; %% Equality Constraint beq = L; ...

9 years ago | 4

| accepted

Answered
System of linear equation with mixed solution
If you have 5 equations in 5 unknowns and linsolve does not complain that the matrix is singular, your system has a unique solut...

9 years ago | 0

Answered
How to get integration of x to the power (1/n) n is the real number from -1 to 1?
I think you mean f=@(x)sign(x)*(abs(x))^(1/3); Best wishes Torsten.

9 years ago | 0

| accepted

Answered
Fitting experimental data to ODE add additional fitting parameter which should not be integrated by ODE-Solver
if true % function bestc = odeParamID() %% Create some "experimental data" clc; clear all; clf filename = 'Methano...

9 years ago | 1

| accepted

Answered
Is it possible to solve this problem with intlinprog? (extended problem from last post)
costs = [1000;200;0;0;0;0;0;0]; A = [1000;2000;5000;6000;2000;3000]; BC = [20 20 5 5 30 10;5 5 30 25 15 10]'; BC = [B...

9 years ago | 0

Answered
Why is my iteration not working. ? ( the solution array has all the same value from first iteration )
function main for i=1:40 vol(i) = 5e-6+(i-1)*1e-6; xsol(i)=fsolve(@(x)Gaddis(x,vol(i)),1e-4); end plot(vo...

9 years ago | 0

| accepted

Answered
probability data distribution randomly or with some probability
Let a(j) be the number of vehicles arriving between hour j-1 and hour j (j=1,...,24). So a is a row vector with 24 element. T...

9 years ago | 0

Answered
how to solve this system differential equations?
fun=@(t,z)[0.2*z(1)^9*(1/z(1)^8+1/z(2)^8-1)^1.125;0.3*z(2)^9*(1/z(1)^8+1/z(2)^8-1)^1.125]; tspan = linspace(0,5,20); z0 ...

9 years ago | 0

Answered
incorrect result in solving system using MATLAB ?
Try Z = null(mat) It should give you a vector Z different from the zero vector that solves mat*Z = 0 Best wish...

9 years ago | 0

| accepted

Answered
How to solve dependent PDEs
Interesting problem. I'd try this way: Multiplying the second equation (p = ...) by 2*pi*r and integrating both sides from...

9 years ago | 0

Answered
what is properly method to optimization of four parameter to be one value?
So you have four data points (X1,Y1), (X2,Y2), (X3,Y3), (X4,Y4) and you want to find the "best" A such that [Y1 Y2 Y3 Y4]...

9 years ago | 0

| accepted

Answered
Implementing forward Euler method
Call "euler_method" in a loop for n = 8*2^k (k=1,...,15) and store Y(n+1,1) for each run. Then make the plot. Best wishes ...

9 years ago | 0

| accepted

Answered
Bvp4c Error; cannot solve collocation equations- singular Jacobian
Replace function dy=projode(n,y) global Pr A M Ec dy=[y(2); y(3); A*y(2)+A*n*y(3)/2+M*y(2)+y(2)^2-y(1)*y(3)-1-A-M; y(...

9 years ago | 0

| accepted

Answered
Define distribution function to be zero if ecdf(X) is not defined
[f,x] = ecdf(X); Ecdf=@(p) interp1(x,f,p)*(p>=50) Best wishes Torsten.

9 years ago | 0

| accepted

Answered
I'm stuck and don't even know where to start
Try to understand the following code: https://de.mathworks.com/matlabcentral/fileexchange/2155-numerical-linear-algebra-and-a...

9 years ago | 0

Answered
I am trying to fit a curve
Use ft = fittype(@(a, b, c, x) a * log(b * x) + c, 'options', fitoption) And for parameter b, don't use 0 as initial gue...

9 years ago | 0

Answered
Extrpoolation not along dimension
There is no "obvious" way to extrapolate data - that's why several methods exist to do so. There is no other way than just sp...

9 years ago | 0

| accepted

Load more