Answered
How to solve ode113 with a time independent load vector?
The example "ODE with Time-Dependent Terms" under http://de.mathworks.com/help/matlab/ref/ode45.html should solve your pro...

10 years ago | 0

| accepted

Answered
Monte Carlo Simulation: x^2
https://www.mathworks.com/matlabcentral/fileexchange/8068-montecarlo/content/montec.m Best wishes Torsten.

10 years ago | 0

| accepted

Answered
Possible issue with multiplication of matrices
You should print CALIB_ratios1(count_c) in full precision. My guess is that it is something like 1.621027357. Best wishes ...

10 years ago | 0

Answered
calculating the sum of values of Jacobi Polynomials
summe=sum(jacobiP(0:4,0,0,-0.655)) Best wishes Torsten.

10 years ago | 1

| accepted

Answered
How to solve DAE system using ode15s and a modified mass matrix
You must not return the derivatives in "Alphamodel2.m" for all values of r. The solver supplies a _scalar_ value for r each t...

10 years ago | 0

Answered
How partial differentiate a big formula ?
You will have to declare K1c,a0 and W as "syms" : http://de.mathworks.com/help/symbolic/diff.html Best wishes Torsten.

10 years ago | 0

| accepted

Answered
Interesting question: construct a polynomial and then evaluate it
Substitute x^r = y. Then the polynomial reads P(y)=a0+a1*y+a2*y^2+...+a_n*y^n which has the normal form to be used with...

10 years ago | 0

Answered
Plotting a function of determinant values vs n values.
for k=1:32 index(k) = k; output = s(k); determinant(k) = det(output); end plot(index,determinant) Bes...

10 years ago | 0

Answered
How do you solve this DE?
Use dde23. Best wishes Torsten.

10 years ago | 0

| accepted

Answered
MATLAB: pdepe boundary function
If "Time" is the vector of time instants corresponding to J, you will have to interpolate J to the time "t" requested by the sol...

10 years ago | 0

| accepted

Answered
Surface fitting with constraints
The first constraint gives dz/dx < 0, thus b+2*d*x(i) < 0 for all i. The second constraint gives a=1 in your model equation. ...

10 years ago | 1

Answered
update a variable in ode45 that is a vector and is independent
So you have (Time,TE) as vectors where "Time" are (e.g.) experimental times and "TE" is a vector of values at these times "Time"...

10 years ago | 0

| accepted

Answered
solution of one variable is non-zero but associated parameters are zero
The analytical solution of your equation y''(t)=0 (for A=0) with initial condition y(0)=10, y'(0)=0.01 is ...

10 years ago | 0

Answered
How to optimize the trace of the square of a matrix?
min: sum_{i=1}^{i=M} (p1i+p2i) s.c. p = p1-p2 p1,p2 >= 0 trace((A*R)^2)/trace(A*R) >= lambda The first constrai...

10 years ago | 0

| accepted

Answered
Solving for variables in 4-by-4 matrix, Empty sym: 0-by-1
Recalculate 9*17+10*18+11*19+12*20. Best wishes Torsten.

10 years ago | 0

| accepted

Answered
how to get an average function?
http://de.mathworks.com/help/curvefit/smoothing-data.html Best wishes Torsten.

10 years ago | 0

| accepted

Answered
problem with "pdepe"
Set the coefficient c in "pdepe" to 1+2./(1+u.^2). Best wishes Torsten.

10 years ago | 0

| accepted

Answered
how to read a function handle parameter when i use ode23
x from above is just a formal paramter. The solution is returned in the y-vector. Best wishes Torsten.

10 years ago | 0

Answered
How to determine roots of a trigonometric equation like 2x-cosx-2=0 ?
fun=@(x)2*x-cos(x)-2; x0=[0 2]; sol=fzero(fun,x0) Best wishes Torsten.

10 years ago | 3

| accepted

Answered
How can I plot a constant Z value with varying X and Y ?
[X,Y] = meshgrid(1:50,1:50); Z=3*ones(length(Y),length(X)); surf(X,Y,Z); Best wishes Torsten.

10 years ago | 2

| accepted

Answered
Forcing fsolve to be positive
Insert re^2 instead of re in your equation. When fsolve has finished, take the square root of the value returned. Best wishes...

10 years ago | 0

| accepted

Answered
I am trying to write a program to solve a quadratic equation using loops and braces. see the images for the exact problem and my attempt
You get back y1, evaluated at x=-0.5, and y2, evaluated at x=9. Do you know why ? 1. Use only one variable (y) instead of ...

10 years ago | 0

Answered
How spline extrapolate?
It does not make any sense at all to evaluate splines below x(1) or above x(end). Best wishes Torsten.

10 years ago | 0

Answered
Max Step that can be used at Eulers Methods
I don't understand the definition of Ea. What is meant by "new approximation" and "old approximation" ? Best wishes To...

10 years ago | 0

Answered
How to solve derivative of vector y respect to vector x
Loop over your data set and calculate the approximate derivatives according to the formula given in ORIGIN. Best wishes To...

10 years ago | 0

Answered
I want to minimize l1-norm problem stated as argmin_v ||v^T*X||_1 such that ||v||_2=1 , X is a matrix having feature vector in each column? Does MATLAB optimization toolbox have function to do that?
Use fmincon to solve the problem min: sum_{i=1}^{i=N} (z1_i+z2_i) s.c. y = z1 - z2 v^T*X - y = 0 v^T*v = 1 ...

10 years ago | 1

| accepted

Answered
How to use 'trapz' command to calculate the area under the curve for each time gap of a graph?
for k=1:length(T)-1 area(k)=0.5*(Y(k)+Y(k+1))*(T(k+1)-T(k)); end area(k) gives you the area under the graph between...

10 years ago | 1

Answered
How to formulate boundary conditions for a PDE system?
Don't use "pdepe" to solve this system. Discretize dI/dx in space. This will result in algebraic equations for I in each spat...

10 years ago | 0

Answered
Is Matlab able to solve my system of coupled ode and pde equations?
pdepe is not able to solve this system. Main problems are the ODEs and the integrals. You will have to discretize the equa...

10 years ago | 0

| accepted

Load more