Answered

How to fix: Index exceeds matrix dimensions

The for-loop increases i automatically. Thus remove the line "i=i+1".

How to fix: Index exceeds matrix dimensions

The for-loop increases i automatically. Thus remove the line "i=i+1".

ongeveer 9 uur ago | 0

Answered

simple integration calculation to find the area ?

value_integral = trapz(T,V)

simple integration calculation to find the area ?

value_integral = trapz(T,V)

ongeveer 13 uur ago | 0

Answered

Matrix dimension do not agree when solving a singular bvp using bvp4c

Your boundary conditions can not be handled by bvp4c: You prescribe two times that y(2)=0 at the left boundary point and you gi...

Matrix dimension do not agree when solving a singular bvp using bvp4c

Your boundary conditions can not be handled by bvp4c: You prescribe two times that y(2)=0 at the left boundary point and you gi...

ongeveer 14 uur ago | 0

Answered

Trying to solve a definite integral but wont give numerical solution

Q=150; k=1.49; n=0.02; So=0.0048; b=3; g=32.2; x1=0; y1=3; %x2=200; h=20; x2=200; f_xy=@(y)(So-((Q*n)./(k*b*(y.^(5/3)...

Trying to solve a definite integral but wont give numerical solution

Q=150; k=1.49; n=0.02; So=0.0048; b=3; g=32.2; x1=0; y1=3; %x2=200; h=20; x2=200; f_xy=@(y)(So-((Q*n)./(k*b*(y.^(5/3)...

ongeveer 14 uur ago | 1

| accepted

Answered

How to translate an ArgMin with a summation inside?

dt = (t-s*x).'*(t-s*x); where x is a scalar and t and s are column vectors of the same length.

How to translate an ArgMin with a summation inside?

dt = (t-s*x).'*(t-s*x); where x is a scalar and t and s are column vectors of the same length.

2 dagen ago | 0

Answered

numerical solution the given equation to determine the zero value of k

solvk = @(k) 1+cos(k*l).*cosh(k*l) + (M/Mt).*k*l.*(cos(k*l).*sinh(k*l)-sin(k*l).*cosh(k*l)); val = fzero(solvk,0.1)

numerical solution the given equation to determine the zero value of k

solvk = @(k) 1+cos(k*l).*cosh(k*l) + (M/Mt).*k*l.*(cos(k*l).*sinh(k*l)-sin(k*l).*cosh(k*l)); val = fzero(solvk,0.1)

3 dagen ago | 0

| accepted

Answered

Skipping the for loop if condition is meet

idx = a~=b; c(idx) = a(idx)-b(idx);

Skipping the for loop if condition is meet

idx = a~=b; c(idx) = a(idx)-b(idx);

3 dagen ago | 0

Answered

Solve one variable equation in Interval

x = (Tem.'*Tem)/(Tem.'*Tshaft) where Tem, Tshaft are column vectors of the same length.

Solve one variable equation in Interval

x = (Tem.'*Tem)/(Tem.'*Tshaft) where Tem, Tshaft are column vectors of the same length.

4 dagen ago | 0

Answered

Need help to put condition in my optimization function

T0= fsolve(@(tw0) (exp(-s2.^2./2).*exp(tw0.*s2).*(1-qfunc((t1-s1-rho.*tw0+rho.*s2)./sqrt(1-rho.^2))))-P*(1-qfunc((t1-rho.*tw0)./...

Need help to put condition in my optimization function

T0= fsolve(@(tw0) (exp(-s2.^2./2).*exp(tw0.*s2).*(1-qfunc((t1-s1-rho.*tw0+rho.*s2)./sqrt(1-rho.^2))))-P*(1-qfunc((t1-rho.*tw0)./...

5 dagen ago | 0

| accepted

Answered

How can I solve a complicated symbolic integral

There are integrals with no analytical antiderivative - yours seems to be one of them. In other words: assign values to r and M...

How can I solve a complicated symbolic integral

There are integrals with no analytical antiderivative - yours seems to be one of them. In other words: assign values to r and M...

5 dagen ago | 0

Answered

Fit differential equation to a curve

Our standard reference: https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting

Fit differential equation to a curve

Our standard reference: https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting

5 dagen ago | 0

Answered

MATLAB CODE TO FIND LOCAL EXTREMA OF A FUNCTION

syms x y f = x^2 + y^3 - 3*x*y; fx = diff(f,x); fy = diff(f,y); eqns = [ fx == 0, fy == 0]; vars = [x y]; [solx, soly] = s...

MATLAB CODE TO FIND LOCAL EXTREMA OF A FUNCTION

syms x y f = x^2 + y^3 - 3*x*y; fx = diff(f,x); fy = diff(f,y); eqns = [ fx == 0, fy == 0]; vars = [x y]; [solx, soly] = s...

10 dagen ago | 0

Answered

Solving Ax=b with both unknowns in A and b

Now if W_{0}^{m} and W_{N+1}^{m} are 0 (I think you meant W_{0}^{m} instead of W_{N}^{m}), you have a system of N equations in W...

Solving Ax=b with both unknowns in A and b

Now if W_{0}^{m} and W_{N+1}^{m} are 0 (I think you meant W_{0}^{m} instead of W_{N}^{m}), you have a system of N equations in W...

10 dagen ago | 1

| accepted

Answered

Fit of numerical expression

Use an anonymous function to define your model equation. For examples, see https://de.mathworks.com/help/curvefit/fittype.html...

Fit of numerical expression

Use an anonymous function to define your model equation. For examples, see https://de.mathworks.com/help/curvefit/fittype.html...

10 dagen ago | 0

| accepted

Answered

Matlab coder alternative to lsqlin

https://www.mat.univie.ac.at/~neum/software/minq/ http://sigpromu.org/quadprog/

Matlab coder alternative to lsqlin

https://www.mat.univie.ac.at/~neum/software/minq/ http://sigpromu.org/quadprog/

10 dagen ago | 0

Answered

how to integrate this function?

T = ...; dt = T/(numel(B)-1); t = linspace(dt,T-dt,numel(B)-1); dB = diff(B); value = trapz(t,dB.^2)

how to integrate this function?

T = ...; dt = T/(numel(B)-1); t = linspace(dt,T-dt,numel(B)-1); dB = diff(B); value = trapz(t,dB.^2)

11 dagen ago | 1

| accepted

Answered

Error using / Matrix dimensions must agree

fp = (1./(x + h) - 2*(1/x) + 1./(x - h)) ./h.^2;

Error using / Matrix dimensions must agree

fp = (1./(x + h) - 2*(1/x) + 1./(x - h)) ./h.^2;

11 dagen ago | 0

| accepted

Answered

What's the best way to check if a system of one equation and one inequality has any solution?

Use "fmincon" with an arbitrary objective function (e.g. 0).

What's the best way to check if a system of one equation and one inequality has any solution?

Use "fmincon" with an arbitrary objective function (e.g. 0).

14 dagen ago | 1

| accepted

Answered

How to write and solve this pde system

If your system is in one spatial dimension, use "pdepe". Examples on how to set up your problem are given here: https://de.mat...

How to write and solve this pde system

If your system is in one spatial dimension, use "pdepe". Examples on how to set up your problem are given here: https://de.mat...

14 dagen ago | 0

| accepted

Answered

How to Solve sets of equations with constants

Multiply the first equation with 2 and subtract the second. d cancels out and you can solve for c. Multiply the first equation ...

How to Solve sets of equations with constants

Multiply the first equation with 2 and subtract the second. d cancels out and you can solve for c. Multiply the first equation ...

15 dagen ago | 1

Answered

how to calculate complex integration along a closed curve.

I = 1/(2*pi*1I) * integral_{t=0}^{t=T} f(z(t))*z'(t) dt where z(t) is a parametrization of gamma. The last integral can numeri...

how to calculate complex integration along a closed curve.

I = 1/(2*pi*1I) * integral_{t=0}^{t=T} f(z(t))*z'(t) dt where z(t) is a parametrization of gamma. The last integral can numeri...

15 dagen ago | 0

| accepted

Answered

How to solve a system of two PDEs encountered in Mathematical Biology

This should help you starting: https://de.mathworks.com/matlabcentral/answers/440015-first-order-partial-differential-equations...

How to solve a system of two PDEs encountered in Mathematical Biology

This should help you starting: https://de.mathworks.com/matlabcentral/answers/440015-first-order-partial-differential-equations...

15 dagen ago | 0

Answered

Solving Finite Difference Method Using ODE15s

%OTHER FILE THAT CALLS FUNCTION (Excluding all the constants) T0 = ones(n,1)*298; %matrix of initial condition for T, rows = nu...

Solving Finite Difference Method Using ODE15s

%OTHER FILE THAT CALLS FUNCTION (Excluding all the constants) T0 = ones(n,1)*298; %matrix of initial condition for T, rows = nu...

16 dagen ago | 1

| accepted

Answered

Solving Finite Difference Method Using ODE15s

You can either solve for T1,...,T_(n-1) (and the two extra variables) using ODE15S and calculate T(n) internally each time the...

Solving Finite Difference Method Using ODE15s

You can either solve for T1,...,T_(n-1) (and the two extra variables) using ODE15S and calculate T(n) internally each time the...

17 dagen ago | 0

Answered

Piecewise function, ranges are variable

EPS = linspace(-0.5,0.5); L0 = arrayfun(@(C)pwlaborsupply0(C, 0.1,0.25),EPS); plot(EPS,L0)

Piecewise function, ranges are variable

EPS = linspace(-0.5,0.5); L0 = arrayfun(@(C)pwlaborsupply0(C, 0.1,0.25),EPS); plot(EPS,L0)

17 dagen ago | 0

| accepted

Answered

ODE for 2 variables

function main p = [1 2 3 4 5 6 7]; A = 20; x0 = 2; y0 = 5; z0 = 27; u0 = -34; a0 = [x0; x0*y0; x0*z0; x0*u0]; ts...

ODE for 2 variables

function main p = [1 2 3 4 5 6 7]; A = 20; x0 = 2; y0 = 5; z0 = 27; u0 = -34; a0 = [x0; x0*y0; x0*z0; x0*u0]; ts...

18 dagen ago | 1

| accepted

Answered

Non linear function for an optimal control problem

https://tomopt.com/docs/propt/tomlab_propt015.php

Non linear function for an optimal control problem

https://tomopt.com/docs/propt/tomlab_propt015.php

18 dagen ago | 0

Answered

could anyone help me to solve the issue.

idx = B==0; B(idx) = A(idx)

could anyone help me to solve the issue.

idx = B==0; B(idx) = A(idx)

18 dagen ago | 0

| accepted

Answered

How to obtain the numerical integration of a set of different values of prameter which appear in Xmin

M=arrayfun(@(D) integral3(@(k,x,y) TuuV(k,x,y,D),kc.*sqrt(mu+delta-D),ku,0,pi/2,0,pi/4,'reltol',1e-4),v);

How to obtain the numerical integration of a set of different values of prameter which appear in Xmin

M=arrayfun(@(D) integral3(@(k,x,y) TuuV(k,x,y,D),kc.*sqrt(mu+delta-D),ku,0,pi/2,0,pi/4,'reltol',1e-4),v);

19 dagen ago | 1

| accepted