Answered
How to generate a percentile graph in matlab?
You mean [People_sort,I]=sort(People); Time_cumsum=cumsum(Time(I)); ? Best wishes Torsten.

11 years ago | 0

| accepted

Answered
Linprog optimisation with slack variable. How do I formulate the matices?
A1 = [x,ones(N,1),-ones(N,1)]; A2 = [-x,-ones(N,1),-ones(N,1)]; A = [A1;A2]; b = [y;-y]; f = [0;0;1]; linprog(f...

11 years ago | 0

| accepted

Answered
The objective function is increased rather than decreased when fmincon is used
You must not only look at the "f(x)"-column, but also at the "feasibility" column. What is a "solution" good for if it is not...

11 years ago | 1

| accepted

Answered
Urgent PDE Problem (Partial Differential Equation)
What are your boundary conditions ? How do the coefficient functions A,B,C,D exactly look like ? Two possibilities to solv...

11 years ago | 0

Answered
BVP4C: Error: Unable to solve the collocation equations -- a singular Jacobian encountered
y1'=y2 y2'=y3 y3'=y4 y4'=solve your first equation for f'''' y5'=y6 y6'=solve your second equation for g'' y...

11 years ago | 0

| accepted

Answered
How to solve overdetermined vector equation?
Use lsqnonlin to minimize the function F(a1,a2) = (sin(a1)*sin(a2)-v1)^2 + (cos(a1)*sin(a2)+v2)^2 + (cos(a2)-v3)^2 Best wi...

11 years ago | 1

Answered
combining ODE_FUNC and EVENT_FUNC for ODE solvers
Define X as global in ODE_FUNC and EVENT_FUNC. Then check whether you can use the (last) value for X calculated in ODE_FUNC a...

11 years ago | 0

Answered
how to solve ode which includes ode and integral
Choose an equidistant grid in y-direction: yi=-t+(i-1)/(n-1)*2t (i=1,...,n). Call the ODE Integrator (ODE15s,e.g.) for the n+...

11 years ago | 0

Answered
model fitting using lsqnonlin
Concatenate y1 and y2 to y=[y1 y2] and x1 and x2 to x=[x1 x2] and proceed as usual. Best wishes Torsten.

11 years ago | 0

Answered
Solving weighted least squares problem with linear constraints
help quadprog Best wishes Torsten.

11 years ago | 1

| accepted

Answered
multipoint boundary value problem
Define a transformed function z by y(x)=z(x/d) and rewrite your ODE in terms of z. Then integrate your ODE in the unkno...

11 years ago | 0

Answered
How to solve a system of two first-order non linear hyperbolic PDEs?
http://www.nag.co.uk/numeric/MB/manual64_24_1/html/D03/d03pff.html http://www.nag.co.uk/numeric/MB/manual64_24_1/html/D03/d03pl...

11 years ago | 0

Answered
How to solve an ODE separately inside function with system of ODEs??
Y0 = [1 1 1 1 1]; [T,Y]=ode15s(@(t,x)Chemical(t,y,a,b),tspan,Y0) function dydt=Chemical(t,y,a,b) vdot=f(t); ...

11 years ago | 0

Answered
Solve function with integration of function of variable
Or so : syms x T T0=solve(int(exp(-x),x,0,T)-0.5==0,T); ? Best wishes Torsten.

11 years ago | 1

| accepted

Answered
Optimization problem - max independent given a function value
I did not check for efficiency, but my suggestion is as follows: 1. Find analytical expressions for the sums involved (Hint: ...

11 years ago | 0

Answered
interp1 and spline error
My guess is that you mean tq = 0:0.01:m; instead of tq = 1:0.01:m; Best wishes Torsten.

11 years ago | 0

Answered
Finding point in line
Calculate n from the relation y_p = m*x_p + n where m is the slope of the line and (x_p,y_p) is the given point. Then t...

11 years ago | 0

| accepted

Answered
ode inside ode ; coupled ode ?
Solve the (N+1) ODEs simultaneously in one call to ODE15s: dv(1)/dt = ... dv(2)/dt = ... ... dv(N)/dt = ... + ...

11 years ago | 0

Answered
Is there any way to calculate the eigenvalues of Jacobian matrix in any non-stiff ODE solver like ode113?
Create the Jacobian and call MATLAB's eig. Or what's the difficulty you encounter ? Best wishes Torsten.

11 years ago | 0

Answered
Newton-raphson method with vectors as functions, and derivative
help polyval help polyder Best wishes Torsten.

11 years ago | 0

Answered
Solving Integro-differential equation with limited integral
Write your integro-differential equation as w1'=w2 w2'=w3 w3'=w4 w4'=w3*integral_{t=0}^{t=1}w2^2(t') dt' Then d...

11 years ago | 1

| accepted

Answered
How to plot this implicit function?
xstart=0; xend=2; nx=10; for i=1:nx+1 x0=xstart+(i-1)/nx*(xend-xstart); x(i)=x0; y0=fzero(@(y) 10000^x...

11 years ago | 0

Answered
How to plot this implicit function?
Given x, calculate y from the relation 10000^x*cos(x*pi/2)+10000^y*cos(y*pi/2)=0 using MATLAB's fzero. Then insert x ...

11 years ago | 0

| accepted

Answered
How to fit a log-normal dist. to data in x-data and y-data format using 'lognfit'?
http://de.mathworks.com/help/stats/nlparci.html Best wishes Torsten.

11 years ago | 0

| accepted

Answered
Solving Nonlinear system of differential equations using Matlab
u''=2w'*w'' w''''=u''*w'+u'*w''+3w'^2*w''=5w'^2'w''+u'*w'' -> u1'=u2 w1'=w2 w2'=w3 w3'=w4 u2'=2*w2*w3 ...

11 years ago | 0

| accepted

Answered
I need to solve equation in mod .what to do?
http://www.mathworks.com/matlabcentral/fileexchange/32856-system-of-linear-congruences/content/lincon.m Best wishes Torste...

11 years ago | 0

Answered
How to solve some "tricky" differential equations
It should be possible to solve the first problem with MATLAB's "dsolve". Otherwise, rewrite you 3rd order ODE as a system of th...

11 years ago | 0

Answered
Solving Coupled First Order ODE dependent on Derivatives
Write your equations as [1 -3; -1 1]*[x' y'] = [x -2*y] and use the mass matrix option of ODE45. Best wishes Tors...

11 years ago | 0

| accepted

Answered
Parameter Errors from lsqcurvefit
I guess that the formulae above work for unconstrained fitting, but are no longer valid if you constrain your parameters. By ...

11 years ago | 0

Answered
Solve complex chamical equilibrium using Newton-Raphson
help fsolve Best wishes Torsten.

11 years ago | 0

Load more