Answered

How to solve an equation, with infinite solutions, to find only n number of solutions?

fun = @(x)cos(x)*cosh(x)-1; Interval = zeros(4,2); Interval(1,:) = [3/2*pi, 3/2*pi+0.5]; Interval(2,:) = [5/2*pi, 5/2...

How to solve an equation, with infinite solutions, to find only n number of solutions?

fun = @(x)cos(x)*cosh(x)-1; Interval = zeros(4,2); Interval(1,:) = [3/2*pi, 3/2*pi+0.5]; Interval(2,:) = [5/2*pi, 5/2...

ongeveer een maand ago | 0

| accepted

Answered

Unbound Shear Layer boundary condition problem

function main xlow = -1; xhigh = 1; A = 1; solinit = bvpinit(linspace(xlow,xhigh,4000),[1,1],1); sol = bvp4c(@bvp4o...

Unbound Shear Layer boundary condition problem

function main xlow = -1; xhigh = 1; A = 1; solinit = bvpinit(linspace(xlow,xhigh,4000),[1,1],1); sol = bvp4c(@bvp4o...

ongeveer een maand ago | 2

| accepted

Answered

What wrong in line 12 ?? help me please (Index exceeds matrix dimensions.)

clear close all; N = 10; h = 0.5; u1(1) = 2 ; u2(1) = 3 ; u3(1) = 0 ; t = 0:h:N*h; for n = 1:N u3(n+1) = u1(n)+h*u2(...

What wrong in line 12 ?? help me please (Index exceeds matrix dimensions.)

clear close all; N = 10; h = 0.5; u1(1) = 2 ; u2(1) = 3 ; u3(1) = 0 ; t = 0:h:N*h; for n = 1:N u3(n+1) = u1(n)+h*u2(...

ongeveer 2 maanden ago | 0

Answered

Plotting the solution of multi-variable non-linear equations (solved using fsolve).

function main G = linspace(250,750).'; X0 = [1,1,1,1]; for i=1:numel(G) sol = fsolve(@(X)ptfunc(X,G(i)),X0); ...

Plotting the solution of multi-variable non-linear equations (solved using fsolve).

function main G = linspace(250,750).'; X0 = [1,1,1,1]; for i=1:numel(G) sol = fsolve(@(X)ptfunc(X,G(i)),X0); ...

ongeveer 2 maanden ago | 0

| accepted

Answered

Problems with integral in fsolve

function main z_0 = [0.5,3,4]; options = optimset('TolFun',1e-8,'TolX',1e-8); sol = fminsearch(@fun,z_0,options) end ...

Problems with integral in fsolve

function main z_0 = [0.5,3,4]; options = optimset('TolFun',1e-8,'TolX',1e-8); sol = fminsearch(@fun,z_0,options) end ...

ongeveer 2 maanden ago | 0

Answered

How to take input from a function file in optimization toolbox objective?

x = fmincon(@objective,x0,A,b) function f = objective(x) % Calculate phi and lambda from x f = -phi*inv(lambda)*phi'; end

How to take input from a function file in optimization toolbox objective?

x = fmincon(@objective,x0,A,b) function f = objective(x) % Calculate phi and lambda from x f = -phi*inv(lambda)*phi'; end

ongeveer 2 maanden ago | 0

| accepted

Answered

Generalized extreme value distribution Parameter Estimation

https://de.mathworks.com/help/stats/gevfit.html

Generalized extreme value distribution Parameter Estimation

https://de.mathworks.com/help/stats/gevfit.html

ongeveer 2 maanden ago | 0

Answered

Unable to find explicit solution

The message says that your differential equation is too complicated to get an explicit expression as solution. Try a numerical ...

Unable to find explicit solution

The message says that your differential equation is too complicated to get an explicit expression as solution. Try a numerical ...

ongeveer 2 maanden ago | 0

Answered

Failure in initial user-supplied objective function evaluation

Try abc = @fun1; x0 = [0,0]; f = abc(x0); and see what is returned in f.

Failure in initial user-supplied objective function evaluation

Try abc = @fun1; x0 = [0,0]; f = abc(x0); and see what is returned in f.

ongeveer 2 maanden ago | 0

Answered

Using ode45 for transient analysis

First possibility: Use the end time of integration big enough such that the water temperature surely exceeds the one you prescr...

Using ode45 for transient analysis

First possibility: Use the end time of integration big enough such that the water temperature surely exceeds the one you prescr...

ongeveer 2 maanden ago | 2

| accepted

Answered

Why is the output of my function infinity?

Since your function tends to 0 as x -> 0 by L'Hospital, you can integrate y = cos((pi*cos(x))/2).^2.*csc(x).*(x > 0);

Why is the output of my function infinity?

Since your function tends to 0 as x -> 0 by L'Hospital, you can integrate y = cos((pi*cos(x))/2).^2.*csc(x).*(x > 0);

ongeveer 2 maanden ago | 0

Answered

Probability of at least 1 even number using while loop

Maybe of interest for checking the result of the Monte Carlo simulation: P(rolling at least one even number with 3 dice) = 1- ...

Probability of at least 1 even number using while loop

Maybe of interest for checking the result of the Monte Carlo simulation: P(rolling at least one even number with 3 dice) = 1- ...

ongeveer 2 maanden ago | 0

Answered

How to find a corresponding matrix value

[M I] = min(t); y(I)

How to find a corresponding matrix value

[M I] = min(t); y(I)

ongeveer 2 maanden ago | 0

| accepted

Answered

Multiple linear equality constraints in fmincon

Aeq = [1 0 1 0 ; 0 1 0 1 ; 1 1 0 0 ; 0 0 1 1]; beq = [sum of column 1 ; sum of column 2 ; sum of row 1 ; sum of row 2] X = [X1...

Multiple linear equality constraints in fmincon

Aeq = [1 0 1 0 ; 0 1 0 1 ; 1 1 0 0 ; 0 0 1 1]; beq = [sum of column 1 ; sum of column 2 ; sum of row 1 ; sum of row 2] X = [X1...

ongeveer 2 maanden ago | 1

| accepted

Answered

Trying to start optimization problem (minimization) with constraints

Setting cJ= c/(2*J) and kJ = k/J, you arrive at theta(t) = exp(-cJ*t)*(1.309*cJ/sqrt(kJ-cJ^2)*sin(t*sqrt(kJ-cJ^2)) + 1.309*cos(...

Trying to start optimization problem (minimization) with constraints

Setting cJ= c/(2*J) and kJ = k/J, you arrive at theta(t) = exp(-cJ*t)*(1.309*cJ/sqrt(kJ-cJ^2)*sin(t*sqrt(kJ-cJ^2)) + 1.309*cos(...

ongeveer 2 maanden ago | 0

Answered

How to Solve Second Order ODE with 1 boundary condition for y and 1 non-zero boundary condition for y'

If you convert your second order equation to a system of first-order equations y1' = y2 y2' = -a*y1 you can use bvp4c to set ...

How to Solve Second Order ODE with 1 boundary condition for y and 1 non-zero boundary condition for y'

If you convert your second order equation to a system of first-order equations y1' = y2 y2' = -a*y1 you can use bvp4c to set ...

ongeveer 2 maanden ago | 1

| accepted

Answered

how to write matlab code

N=20:50 A = setdiff(N,N(mod(N,4)==0 & mod(N,5)==0))

how to write matlab code

N=20:50 A = setdiff(N,N(mod(N,4)==0 & mod(N,5)==0))

ongeveer 2 maanden ago | 0

Answered

Partial Differential Equation Toolbox

Take c = [- x, x - y ; - ( x - y ), - y] Then -div(c*grad(u)) = x * d^2u/dx^2 + y * d^2u/dy^2 Section 2-62 in http://www....

Partial Differential Equation Toolbox

Take c = [- x, x - y ; - ( x - y ), - y] Then -div(c*grad(u)) = x * d^2u/dx^2 + y * d^2u/dy^2 Section 2-62 in http://www....

ongeveer 2 maanden ago | 1

| accepted

Answered

Solving for two uknown vectors in a matrix equation

syms t1 t2 s1 s2 s3 [solt1 solt2 sols1 sols2 sols3] = solve([N*[t1;t2]+R*[s1;s2;s3] == x],[t1 t2 s1 s2 s3])

Solving for two uknown vectors in a matrix equation

syms t1 t2 s1 s2 s3 [solt1 solt2 sols1 sols2 sols3] = solve([N*[t1;t2]+R*[s1;s2;s3] == x],[t1 t2 s1 s2 s3])

ongeveer 2 maanden ago | 0

Answered

Question about Taylor series

d(1) = cos(a), d(2) = -sin(a), d(3) = -cos(a), d(4) = sin(a) So your if-statement to determine f^(n)(a) is wrong. Further, "er...

Question about Taylor series

d(1) = cos(a), d(2) = -sin(a), d(3) = -cos(a), d(4) = sin(a) So your if-statement to determine f^(n)(a) is wrong. Further, "er...

ongeveer 2 maanden ago | 0

Answered

solving an implicit function with two variables

Multiply by P^r and substitute P^r = x. You'll get a quadratic equation in x. Solutions are P1 = ( (Q^(-r)) / 2 * (1 + sqrt(1 ...

solving an implicit function with two variables

Multiply by P^r and substitute P^r = x. You'll get a quadratic equation in x. Solutions are P1 = ( (Q^(-r)) / 2 * (1 + sqrt(1 ...

ongeveer 2 maanden ago | 1

| accepted

Answered

Standard Deviation of product of two Gaussian Distribution.

https://math.stackexchange.com/questions/1416518/standard-deviation-of-the-product-of-gaussians

Standard Deviation of product of two Gaussian Distribution.

https://math.stackexchange.com/questions/1416518/standard-deviation-of-the-product-of-gaussians

ongeveer 2 maanden ago | 2

| accepted

Answered

Solving compound linear optimization problem

Look up https://de.mathworks.com/discovery/multiobjective-optimization.html

Solving compound linear optimization problem

Look up https://de.mathworks.com/discovery/multiobjective-optimization.html

ongeveer 2 maanden ago | 0

Answered

How do I solve for the upper bound of a definite integral when I know what the integral is equal to?

a1=...; a2=...; w=...; xo=...; value_integral=...; sol = fzero(@(C)((integral(@(x)1./(a1*sin(w*x)+a2*sin(3*w*x)))-value_int...

How do I solve for the upper bound of a definite integral when I know what the integral is equal to?

a1=...; a2=...; w=...; xo=...; value_integral=...; sol = fzero(@(C)((integral(@(x)1./(a1*sin(w*x)+a2*sin(3*w*x)))-value_int...

ongeveer 2 maanden ago | 1

Answered

Pseudo-random distribution of points with minimum distance

See Bruno Luong's code under https://de.mathworks.com/matlabcentral/answers/432516-model-of-a-crowd-on-concert-venue-or-how-to-...

Pseudo-random distribution of points with minimum distance

See Bruno Luong's code under https://de.mathworks.com/matlabcentral/answers/432516-model-of-a-crowd-on-concert-venue-or-how-to-...

ongeveer 2 maanden ago | 0

| accepted

Answered

Last Tableau of Simplex Method in LP Problem

https://www.12000.org/my_notes/simplex/index.htm

Last Tableau of Simplex Method in LP Problem

https://www.12000.org/my_notes/simplex/index.htm

ongeveer 2 maanden ago | 0

| accepted

Answered

Error in ode function -- not enough input arguments

Change these lines: dEc2adt = @(t, Ec,Tc) (-alfa.*Ek2a(t))./Tc - Ec./Tc; [t2a Ec2a] = ode15s(@(t,Ec)dEc2adt(t, Ec,Tc), t2a, ...

Error in ode function -- not enough input arguments

Change these lines: dEc2adt = @(t, Ec,Tc) (-alfa.*Ek2a(t))./Tc - Ec./Tc; [t2a Ec2a] = ode15s(@(t,Ec)dEc2adt(t, Ec,Tc), t2a, ...

ongeveer 2 maanden ago | 1

| accepted

Answered

Solvin Differential Algebraic Equations

function main %gaslift systems network tspan = [0:1:60]; % The script for gas lift network model defining initial condi...

Solvin Differential Algebraic Equations

function main %gaslift systems network tspan = [0:1:60]; % The script for gas lift network model defining initial condi...

ongeveer 2 maanden ago | 0

| accepted

Answered

Problems with numerical integration with 2 variables

function main Result = integral(@fun,0,pi/2) end function funret = fun(theta) n = numel(theta); funret = zeros(n,1)...

Problems with numerical integration with 2 variables

function main Result = integral(@fun,0,pi/2) end function funret = fun(theta) n = numel(theta); funret = zeros(n,1)...

ongeveer 2 maanden ago | 0

| accepted

Answered

How do you get ten random values between -pi/2 and pi/2

theta = -pi/2 + rand(10,1)*pi

How do you get ten random values between -pi/2 and pi/2

theta = -pi/2 + rand(10,1)*pi

2 maanden ago | 0