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...

5 giorni 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...

6 giorni 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...

6 giorni 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/

6 giorni 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)

6 giorni 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;

6 giorni 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).

10 giorni 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...

10 giorni 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 ...

10 giorni 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...

11 giorni 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...

11 giorni 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...

11 giorni 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...

12 giorni 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)

13 giorni 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...

13 giorni 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

13 giorni 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)

13 giorni 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);

14 giorni ago | 1

| accepted

Answered

how to increase a column with every for loop

column = x.*y; iter = 0; while iter < 6 [calculate new x-vector]; column = [column ; x.*y]; iter = iter + 1; end

how to increase a column with every for loop

column = x.*y; iter = 0; while iter < 6 [calculate new x-vector]; column = [column ; x.*y]; iter = iter + 1; end

17 giorni ago | 0

Answered

How to find the roots of a sum of divisions of polynomials

Multiply by prod (x*C_i - D_i)^3 and determine the roots of the resulting polynomial of degree 3*(N-1)+1 using the "roots" com...

How to find the roots of a sum of divisions of polynomials

Multiply by prod (x*C_i - D_i)^3 and determine the roots of the resulting polynomial of degree 3*(N-1)+1 using the "roots" com...

18 giorni ago | 0

| accepted

Answered

How can i fix this problem "Undefined function 'Taylor' for input arguments of type 'double'."

MATLAB's "taylor"-function is called with a small "t" , and your argument list does not seem to be compatible with this function...

How can i fix this problem "Undefined function 'Taylor' for input arguments of type 'double'."

MATLAB's "taylor"-function is called with a small "t" , and your argument list does not seem to be compatible with this function...

18 giorni ago | 0

Answered

linear optimization using optimization toolbox and minimize array sum

https://math.stackexchange.com/questions/113270/the-median-minimizes-the-sum-of-absolute-deviations-the-l-1-norm

linear optimization using optimization toolbox and minimize array sum

https://math.stackexchange.com/questions/113270/the-median-minimizes-the-sum-of-absolute-deviations-the-l-1-norm

19 giorni ago | 0

Answered

Error "Integrand output size does not match the input size." in implementing double integration. Kindly guide me in eliminating the error.

Use ./ instead of / in your function definition.

Error "Integrand output size does not match the input size." in implementing double integration. Kindly guide me in eliminating the error.

Use ./ instead of / in your function definition.

19 giorni ago | 0

| accepted

Answered

How can I solve a system of partial differential equations?

Use a first-order difference quotient to discretize dT_f/dz in space and use ODE15S to solve the resulting system of ordinary di...

How can I solve a system of partial differential equations?

Use a first-order difference quotient to discretize dT_f/dz in space and use ODE15S to solve the resulting system of ordinary di...

21 giorni ago | 0

Answered

how to generate random point inside a sphere

R = 3; % radius of the sphere Xc = 4; Yc = -4; Zc = pi; % (Xc,Yc,Zc) center of the sphere rval = 2*rand(1)-1; elevation...

how to generate random point inside a sphere

R = 3; % radius of the sphere Xc = 4; Yc = -4; Zc = pi; % (Xc,Yc,Zc) center of the sphere rval = 2*rand(1)-1; elevation...

26 giorni ago | 0

Answered

How to find the name of a function for a known value?

Textedit the code and search for the string '0.98'.

How to find the name of a function for a known value?

Textedit the code and search for the string '0.98'.

26 giorni ago | 0

| accepted

Answered

SpecifyCoefficients for a specific PDE

https://de.mathworks.com/help/pde/examples/heat-distribution-in-a-circular-cylindrical-rod.html

SpecifyCoefficients for a specific PDE

https://de.mathworks.com/help/pde/examples/heat-distribution-in-a-circular-cylindrical-rod.html

26 giorni ago | 0

| accepted

Answered

R2 approximation error as in Excel

https://de.mathworks.com/help/stats/coefficient-of-determination-r-squared.html

R2 approximation error as in Excel

https://de.mathworks.com/help/stats/coefficient-of-determination-r-squared.html

26 giorni ago | 0

Answered

Creating new matrix from the second column of other matrices

new_matrix = [PIV_1(:,2),PIV_2(:,2),...,PIV_10918(:,2)] Quite much to write ... You should have worked with one 10918x1000x4 ...

Creating new matrix from the second column of other matrices

new_matrix = [PIV_1(:,2),PIV_2(:,2),...,PIV_10918(:,2)] Quite much to write ... You should have worked with one 10918x1000x4 ...

28 giorni ago | 0