Answered
Solving DAE equations simultaneously with ODE15s
M=[1/w(2) 2*w(1) 0 0; 0 0 0 0; 0 0 l/w(1) 0; 1 1 0 0] f=[w(4);w(4)+w(2)+5.0;w(2);25.0] if you order the solution variable as...

9 years ago | 0

Answered
Solve an equation of 3 unknowns
Forget about z,w,k1,k2,k3. You have a regression equation of the form t = c1 + c2*A and you want to fit c1 and c2. ...

9 years ago | 0

| accepted

Answered
How to solve boundary condition with ordinary differential in PDEPE
PDEPE does not accept ordinary differential equations as boundary conditions. In the case above, you can simply integrate the...

9 years ago | 0

| accepted

Answered
using the linprog function for two constraints?
If you are in the stage of optimization, you don't know the 154.8 in the equation 60.44x+13.8y+8.4z = 154.8, but only the power ...

9 years ago | 0

| accepted

Answered
I keep getting the error "Undefined function or variable". What is wrong with this ODE example?
Try function main options = odeset('RelTol', 1e-4, 'NonNegative', [1 2 3]); [t,x] = ode45(@SIR, [0 10], [1000; 1; 0]...

9 years ago | 1

Answered
How i can add all elements inside a matrix?
S_rows = sum(A,2); S_complete = sum(S_rows); Best wishes Torsten.

9 years ago | 0

| accepted

Answered
How can I draw a 3d graph which has 1 implicit function of f(x,y)=0 and 1 explicit function of z=g(x,y)
https://de.mathworks.com/help/matlab/ref/fimplicit.html https://de.mathworks.com/help/matlab/ref/surf.html Best wishes ...

9 years ago | 0

Answered
how to write equation in matlab?
k2 = @(x,y) k1(x,y+p/2)*(y>p/2); Best wishes Torsten.

9 years ago | 0

| accepted

Answered
How to solve two second order partial differential equations simultaneously?
Solve the first equation for d^2s/dx^2 and insert the expression in the second equation: (1+rho)/alpha * d^2s/dx^2 - (zeta+...

9 years ago | 0

Answered
How can I solve an integral problem included of cumulative distribution function of chi-square distribution?
fun=@(y)chi2cdf((n-1)*(3*Cp*sqrt(n)-y).^2/(9*n*cstar^2),n-1).*(normpdf(y+3*(Cp-C)*sqrt(n))+normpdf(y-3*(Cp-C)*sqrt(n))); re...

9 years ago | 0

| accepted

Answered
How can I solve PDE with boundary condition?
Use "bvp4c". By the way: this is a second-order ODE, not a PDE. Best wishes Torsten.

9 years ago | 0

Answered
N(N-1)/2 distances from a d*N matrix of column vectors (5000<N<50000)
Generate a copy of the matrix and use the solution given under https://statinfer.wordpress.com/2011/11/14/efficient-matlab-i-...

9 years ago | 0

Answered
How to select the maximum points of the absolute values of a sin function
https://de.mathworks.com/help/signal/ref/findpeaks.html Best wishes Torsten.

9 years ago | 1

| accepted

Answered
matrix dimension problem with integral
A=@(x) integral(@(y) y.*besselj(1,x.*y),Ra_i,Ra_o,'ArrayValued',true); Best wishes Torsten.

9 years ago | 0

| accepted

Answered
How does matlab solve a pair of coupled differential equations?
Correct solution is N_ex(t) = 1000*exp(-t/T_th) N_cb(t) = 1000*(1-exp(-t/T_th)) Best wishes Torsten.

9 years ago | 0

Answered
How to calculate 5 times integral
Try function main a1 = ...; a2 = ...; b1 = ...; b2 = ...; c1 = ...; c2 = ...; d1 = ...; d2 = ...; ...

9 years ago | 0

| accepted

Answered
Error of spatial discretization in implementation of pdepe code.
https://de.mathworks.com/matlabcentral/answers/93568-how-can-i-solve-my-fourth-order-pde-using-pdepe Best wishes Torsten.

9 years ago | 0

Answered
How to use objective function in linear programming ?
If you minimize 3*x1+4*x2, you automatically minimize 3*x1+4*x2+30. So a constant in the objective function can be ignored in...

9 years ago | 0

Answered
I have different answer using 'norm'. Do I miss something?
norm(A) and norm(A,'fro') are different things. Best wishes Torsten.

9 years ago | 0

| accepted

Answered
Optimise the solution of a Matrix setting constraints to limit the possible solutions within a range?
https://de.mathworks.com/help/optim/ug/lsqlin.html ? Best wishes Torsten.

9 years ago | 0

Answered
Customising the lsqcurvefit function for an user defined error metric??
Use "lsqnonlin" instead of "lsqcurvefit" and define the f_i as f_i = sqrt(w_i)*(y_i-ydata_i) where w_i is the weight for...

9 years ago | 0

| accepted

Answered
Least squares plane from a matrix of z values
[X Y] = meshgrid(x,y); X = X(:); Y = Y(:); Z = z(:); I = ones(size(X)); A = [I X Y]; b = Z; coeff = A\b; ...

9 years ago | 0

Answered
error in a function, Error: In an assignment A(I) = B, the number of elements in B and I must be the same.
You see the difference ? https://de.mathworks.com/matlabcentral/newsreader/view_thread/59214 Best wishes Torsten.

9 years ago | 0

| accepted

Answered
Graph for a set of equations not giving correct results
k=0.07; v=zeros(31,1); v(1)=45; for n=1:30 d=0.2847-0.07*(v(n)-25); v(n+1)=0.2847*v(n)+1.2*256*d^2/(v(n)-16...

9 years ago | 1

| accepted

Answered
From a pdf to a histogram.
I don't understand the problem you have. The probability P that a person in Europe has income x is P(income=x)=sum_{i=1}...

9 years ago | 0

Answered
second order differential equation with variable coefficients
Write your equation as a first-order system y1'=y2 y2'=(-k*y1+F(y1))/m use "interp1" to interpolate F(y1) from your k...

9 years ago | 0

| accepted

Answered
compare function values with constant
Why don't you simply calculate chi2cdf(LR2,1) ? Best wishes Torsten.

9 years ago | 1

| accepted

Answered
How to solve this Algebraic integral with limits
You should use a numerical solver for this integral. Use "integral". Best wishes Torsten.

9 years ago | 0

| accepted

Answered
how to write equation in matlab ??
I=@(x) s(x).*sin(2*pi*f*x); plot(x,I(x)) Best wishes Torsten.

9 years ago | 2

| accepted

Load more