Answered
How to set these boundary conditions in pdepe solver?
1. There is no other way as to combine the fluxes of your pde-equations such that you get du4/dx and du14/dx-a*u14 isolated. If...

10 years ago | 0

Answered
solving an unknown 1024x1024 variable
A linear equation in A can easily be solved analytically: A=jp.*((Vp1-V1)-(Vp2-V2))./((Vp1-V1).*exp(V2-VT)-(Vp2-V2).*exp(V1...

10 years ago | 1

Answered
Is it possible to numerically integrate the solution from a 3-D eigenvalue PDE that was solved using the PDE toolbox?
I only found this old answer, but maybe it helps: https://de.mathworks.com/matlabcentral/newsreader/view_thread/317560 Bes...

10 years ago | 0

| accepted

Answered
fmincon test the same parameters multiple times
fmincon has to build up the Jacobian matrix dC/dpi (C: costfunction, pi: parameter i). For this end, fmincon calls the costfu...

10 years ago | 1

| accepted

Answered
How can i solve matrix equations?
Supply F=[X,Y;Y,Z]*[Tx;x(1);Txy;x(2);x(3);x(4)]-[x(5);Cy;x(6);x(2);x(3);x(4)] for MATLAB's "lsqnonlin" if e.g. Cx, Cxy, Vx...

10 years ago | 0

Answered
I want to generate a fixed percent of random points on a straight line joining two points.
Instead of generating 100 random numbers, use "rand" to generate 5 random numbers on [0:1] and set the points to lambda=ra...

10 years ago | 0

| accepted

Answered
Find all the roots of the following function in the interval 0.5<=x<=5. f(x)=(2/x-x)cos(x)+0.0119. Each root must be accurate to a minimum of six significant figures. I really can't figure it out.
Plot the graph for f(x) in [0.5:5], choose intervals that contain only one of the roots and use MATLAB's fzero together with the...

10 years ago | 0

| accepted

Answered
How to calculate the area under the curve for each time gap using "trapz" command?
area(1:N-1)=0.5*(X(1:N-1,5))+X(2:N,5))*(T(2:N,5)-T(1:N-1,5)) Best wishes Torsten.

10 years ago | 0

| accepted

Answered
Problem in inputting constrains for fmincon with ODE45
If you want to set the constraint y1(z=1) <= 3, e.g, you can just set c(1)=y(end,1)-3.0 in fmincon's "nonlcon" function....

10 years ago | 0

Answered
How to use matlab to find an optimized matrix with regarding to minimization of a norm?
Try function main Aeq=[1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1]; beq=ones(3,1); lb=...

10 years ago | 0

Answered
How to fit data to a function with last output as input?
A=zeros(N-1,3); b=zeros(N-1); A(:,1)=x(2:N); A(:,2)=x(1:N-1); A(:,3)=y(1:N-1); b(1:N-1)=y(2:N); k=A\b; Be...

10 years ago | 1

| accepted

Answered
Solving a 3 variables ODE using a for loop and a step-by-step process
I wonder why you don't use one of MATLAB's ODE-integrators, e.g. ODE15S. Best wishes Torsten.

10 years ago | 0

Answered
How do I estimate parameters of a system of ODEs using fmincon?
Star Strider's solution under https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting should...

10 years ago | 0

Answered
What's the difference in matlab's code when i want to solve this equation y''=a,y(0)=0,y(1)=0 and this equation y''=a,y'(0)=0,y(1)=0???/
For the first problem, you will have to solve the linear system of equations y(1) = 0 y(3) - 2*y(2) + y(1) = a*dt^2 ....

10 years ago | 0

| accepted

Answered
Solving equation with integral numerically for variable
C1=b1/((exp(b1*N)-1)*(1+Y21+Y11+Y11*Y21)) Best wishes Torsten.

10 years ago | 1

| accepted

Answered
how to solve differential equations
function main L=...; Th_in = 20; Tc_in = 5; solinit = bvpinit(linspace(0,L,100),),[Th_in Tc_in Th_in Tc_in Th_in T...

10 years ago | 1

Answered
Defining boundary condition for pde for pdepe function
1. "trial1" is not part of the list of functions you call pdepe with. 2. You will have to include s1,s2,qr,f,a,n,ks in the pa...

10 years ago | 0

| accepted

Answered
Solve wind turbine with ode solver
I don't understand this line in your code. u(1:nodes*ld+3*zusFG,1)=K\(A-M*du(nodes*ld+3*zusFG+1:(nodes*ld+3*zusFG)*2,1)-...

10 years ago | 0

| accepted

Answered
How can i Minimizing a function
help linprog Best wishes Torsten.

10 years ago | 0

| accepted

Answered
I want to apply newton's method on following set of equations
Use MATLAB's "fsolve": http://de.mathworks.com/help/optim/ug/fsolve.html Best wishes Torsten.

10 years ago | 0

Answered
How I can solve diferential equation using Matlab?
Use the "dsolve"-command: http://de.mathworks.com/help/symbolic/dsolve.html Best wishes Torsten.

10 years ago | 0

Answered
Eigenvalue computation for large matrix
For the problem with complex eigenvalues, see what happens if you set c1=0.5*(c1+c1') before calling "eig". Best wishes To...

10 years ago | 0

Answered
How to use a formula for all elements of matrix?
for u1=1:size(M,1) for v1=1:size(M,2) m1 = M(u1,v1); for u2=1:size(M,1) for v2=1:size(M,2) ...

10 years ago | 0

| accepted

Answered
Solving PDEs using fsolve
If your problem is stationary and you discretized your equations and boundary conditions correctly, this results in a big nonlin...

10 years ago | 0

Answered
Using Matlab ODE integrators with the method of lines
Call the ODE-integrator for a small time step, modify the solution and use the modified solution as initial value for the next s...

10 years ago | 0

Answered
ODE15i/s sparse Jacobian pattern trick
Your approach is sound if the sparsity pattern does not change with time. I guess this possible time-dependence is the reason...

10 years ago | 1

| accepted

Answered
how can I find the eigenfunction of a linear ODE?
Take a look at the example "Compute Fourth Eigenvalue of Mathieu's Equation" under http://de.mathworks.com/help/matlab/...

10 years ago | 1

Answered
Inner matrices error question
You can't matrix-multiply a 1x401 array with a 1x401 array. Maybe you mean componentwise multiplication: HH=H.*H2; Bes...

10 years ago | 0

Answered
How to generate power-law random numbers ?
What is the probability density function for the power law distribution you use ? p(x)=(alpha-1)*x^(-alpha) ? In thi...

10 years ago | 1

| accepted

Answered
solving ode with variable, discrete coefficients
Take a look at the example "ODE with Time-Dependent Terms" under http://de.mathworks.com/help/matlab/ref/ode45.html to see...

10 years ago | 0

Load more