Answered
plz. help me TT I want write if(((mp(1)>0)&(mp(1)<140))&((mp(2)>0)&(mp(2)<140)))
if (mp(1) > 0) && (mp(1) < 140) && (mp(2) > 0) && (mp(2) < 140) ... end Best wishes Torsten.

11 years ago | 0

| accepted

Answered
Expression of y as a function of x for trigonometric equation
f=@(y,x)acos(1-2*y)-2*(1-2*y)*(y-y^2)^0.5-x; fun=@(y)f(y,x); y0 = [0 1]; for k=1:numel(X) x=X(k); Y(k)=fzer...

11 years ago | 0

Answered
How to solve a differential equations system?
The system is too complex to be solved with dsolve. Use a numerical solver instead (e.g. ODE15S). You will also need initi...

11 years ago | 0

Answered
??? Undefined function or method 'Max' for input arguments of type 'double'.
The name of the function is "max", not "Max". Best wishes Torsten.

11 years ago | 0

Answered
how to save iterations?
Instead of cm1, use cm1(i). Best wishes Torsten.

11 years ago | 0

Answered
nonlinear curve fit: how to optimize?
To get the curve you want, you will have to introduce different weights for different data points. Deviances between data and mo...

11 years ago | 0

| accepted

Answered
Iteratively solve IVP with ode45
function main h0=...; Qout0=...; x0=[h0 Qout0]; M=[1 0 0 0]; options=odeset('Mass',M); [T Y]=ode15s(@f...

11 years ago | 0

| accepted

Answered
I am trying integration by trapz but I am geting NaN numbers in answer, How to solve this problem ?
I would guess that there are NaN elements in Vel.time or IFC. Best wishes Torsten.

11 years ago | 0

Answered
How do I solve multivariable equation system?
s2 = ogr3/ogr1 - omega^2 - 2*ksi^2*omega^2*Lambda instead of s2 = ogr3/ogr1 - omega^2 + 2*ksi^2*omega^2*Lambda Best...

11 years ago | 0

| accepted

Answered
Help while using ode45
The ballode example should be helpful for your purpose: http://de.mathworks.com/help/matlab/math/ordinary-differential-equati...

11 years ago | 0

| accepted

Answered
Implicit Constraints using fmincon
Use the nonlinear constraint c(x)<=0 instead of the linear constraint A*x<=b. Best wishes Torsten.

11 years ago | 0

| accepted

Answered
Attempted to access x2(131,1); index out of bounds because size(x2)=[1,512]
Arrays mri and mri2 don't seem to be of the same size, as required by check_loseblock. Check the array sizes. Best wishes ...

11 years ago | 0

Answered
How can I use truncate function for F distribution?
n=100; xu = rand(n); xft = finv(fcdf(a,v1,v2)+xu*(fcdf(b,v1,v2)-fcdf(a,v1,v2)),v1,v2); gives you n random numbers xft...

11 years ago | 1

Answered
How to run Fsolve using vectors
a = [2 1 3 4]; b = [-5 -10 -20 -30]; F = @(x)log(x.^a)-x-b; x0 = [1 1 1 1]; x = fsolve(F,x0,optimset('Display',...

11 years ago | 1

Answered
How to find optimum value to minimize error?
A=[0 1;1 1;2 1;3 1;4 1]; b=[3; 5; 7; 9 ; 11]; x=A\b; m=x(1); c=x(2); Best wishes Torsten.

11 years ago | 0

Answered
How to use quadprog with a group of points
Since you try to minimize the maximum distance between the center (xc,yc) of the circle and the points (x(i),y(i)) given, try fm...

11 years ago | 0

Answered
Problem using nlinfit function
1. ydata has to be an array of the same size as xdata (I don't know the size of the array beta). 2. The call to nlinfit must ...

11 years ago | 0

| accepted

Answered
How can i define algebraic equation in differential function in MATLAB?
MATLAB's ODE solvers can account for systems which are a mixture of algebraic and differential equations. Look at the example...

11 years ago | 0

Answered
How to calculate the time of a motion
If you have a parametrization of your path of the form x=x(s),y=y(s) with (x(0),y(0))=startpoint and (x(1),y(1))=endpoint, then ...

11 years ago | 0

Answered
Solve eqn and get real solution
syms s y=-(2*((622930548819969075*s^4)/147573952589676412928 - (45369884049352485*s^3)/576460752303423488 + (6927293897...

11 years ago | 0

Answered
Solve eqn and get real solution
s=solve(R_,s,'Real',true); Best wishes Torsten.

11 years ago | 0

Answered
how can i find roots of a DAE system ?
Use one of the ODE solvers under http://de.mathworks.com/help/matlab/ref/ode45.html or ODE15i. Which solver is suitable...

11 years ago | 0

Answered
Reiteration of Beverton-Holt model
b is a vector of length 5, so in y(j,i) = (b*y(j-1,i))/(1+(c*y(j-1,i))) you try to assign a vector ((b*y(j-1,i))/(1+(c*y(...

11 years ago | 0

Answered
Is there any clue to solve the following system of equation numerically by fourth order Runge-Kutta method?
If you want to use a MATLAB solver, write your system as dy1/dx = y3 dy2/dx = y4 0= y3^2-y1*y3+x*y4 0= y4^2+x*y3*y...

11 years ago | 0

| accepted

Answered
How do I solve the differential equation numerically by fourth order Runge-Kutta Method?
Your system can be written in the form M(x,y)*dy = f(x,y) where M is a (2x2) matrix. To apply the usual Runge-Kutta sc...

11 years ago | 0

| accepted

Answered
How to use ODE45 with multiple initial conditions?
Call ode45 four times in a loop, first for [x1init(1) x2init(1)] as initial condition, then for [x1init(2) x2init(2)] as initial...

11 years ago | 1

Answered
How do I solve the following system of differential equation numerically by fourth order Runge-Kutta method?
Solve for dy_1/dx and dy_2/dx as functions of x, y_1 and y_2. Then apply the Runge-Kutta scheme. I get dy_1/dx = y_1...

11 years ago | 0

Answered
Multi-input state space solution using ODE45
K is (2x6) and x is (8x1), thus K*x is not defined. Best wishes Torsten.

11 years ago | 0

| accepted

Answered
Solving a PDE withconditions not situated on the left and right boundaries
Transform your equation to the new coordinate x* such that the boundaries become 0 and 1 for all times t: x* = (x-lower(t))/(...

11 years ago | 0

Answered
Help solving this msg: "In an assignment A(I) = B, the number of elements in B and I must be the same" according to my code bellow.
It's impossible to assign a vector to a scalar variable. E.g. Pc(1) is a scalar, [2;4;2;1] is a vector. Best wishes Torst...

11 years ago | 0

Load more