Answered

sol2 = bvp4c(@bvpexam2, @bcexam2, sol);

Ibrardual() function Ibrardual Nt=0.5; Nb=0.5; Le=2; Pr=1; Alpha=[-0.2138;-0.4]; s=1; A=1; %% solution in structure form %...

sol2 = bvp4c(@bvpexam2, @bcexam2, sol);

Ibrardual() function Ibrardual Nt=0.5; Nb=0.5; Le=2; Pr=1; Alpha=[-0.2138;-0.4]; s=1; A=1; %% solution in structure form %...

15 dagar ago | 0

| accepted

Answered

What is the most computationally efficient factorization of a matrix A?

Prove that the matrix is positive definite and count the number of FLOPs of Cholesky compared to the other factorizations. Sect...

What is the most computationally efficient factorization of a matrix A?

Prove that the matrix is positive definite and count the number of FLOPs of Cholesky compared to the other factorizations. Sect...

16 dagar ago | 0

Answered

what is the error here?

The error is that the parameter "S" is not an input to function "odeBVP" and thus undefined in f =[y(2);y(3);(1/3)*D1*((y(2)^2...

what is the error here?

The error is that the parameter "S" is not an input to function "odeBVP" and thus undefined in f =[y(2);y(3);(1/3)*D1*((y(2)^2...

17 dagar ago | 0

Answered

Runge kutta giving complex numbers

It doesn't make sense to use such discontinuous input data for the solution of a differential equation. Solving a differential ...

Runge kutta giving complex numbers

It doesn't make sense to use such discontinuous input data for the solution of a differential equation. Solving a differential ...

19 dagar ago | 0

Answered

How does Matlabs Symbolic Math Toolbox always finds an analytical eigendecomposition for arbitrary polynomial matrices?

For me this begs the question, is the eigenvalue polynomial from eig(...) truly analytic? What do you mean for a polynomial to ...

How does Matlabs Symbolic Math Toolbox always finds an analytical eigendecomposition for arbitrary polynomial matrices?

For me this begs the question, is the eigenvalue polynomial from eig(...) truly analytic? What do you mean for a polynomial to ...

19 dagar ago | 1

| accepted

Answered

Want to understand how to implement in matlab the following differential equation?

If you know P1 over time, you don't have a differential equation, but simply an algebraic relation to determine Q: Q = (P1-P2)/...

Want to understand how to implement in matlab the following differential equation?

If you know P1 over time, you don't have a differential equation, but simply an algebraic relation to determine Q: Q = (P1-P2)/...

19 dagar ago | 0

Answered

Coding the Thomas algorithm for a heat and mass transfer problem

When I run the function, I get: Not enough input arguments. Error in solvePDEs (line 27) y(n) = linspace(y_span(1), y_s...

Coding the Thomas algorithm for a heat and mass transfer problem

When I run the function, I get: Not enough input arguments. Error in solvePDEs (line 27) y(n) = linspace(y_span(1), y_s...

20 dagar ago | 1

| accepted

Answered

Mapreduce with tall array in matrix multiplication

Would this work for you ? B = ones(2,3); A = tall(ones(200,2)); values = A*B; gather(values)

Mapreduce with tall array in matrix multiplication

Would this work for you ? B = ones(2,3); A = tall(ones(200,2)); values = A*B; gather(values)

20 dagar ago | 0

Answered

Does pdepe accept 'Vectorized', 'on' as an option? If so, what does it do?

If you look into the documentation for "pdepe", you will find that the "Vectorized" option cannot be chosen: Cited from the doc...

Does pdepe accept 'Vectorized', 'on' as an option? If so, what does it do?

If you look into the documentation for "pdepe", you will find that the "Vectorized" option cannot be chosen: Cited from the doc...

21 dagar ago | 0

| accepted

Answered

Complex Integration in MATLAB with symbolic integration limits

Does this help ? Note that no distiction is made about the R-value. But you should keep in mind that the answer is incorrect i...

Complex Integration in MATLAB with symbolic integration limits

Does this help ? Note that no distiction is made about the R-value. But you should keep in mind that the answer is incorrect i...

21 dagar ago | 0

| accepted

Answered

how i can change column vector into row vector??

Simply converting a row vector into a column vector needs the usual transpose operator which is .' You used only ' with is conju...

how i can change column vector into row vector??

Simply converting a row vector into a column vector needs the usual transpose operator which is .' You used only ' with is conju...

23 dagar ago | 0

Answered

Does cummax works in a sde solver?

My question is: does here cummax works on all previous values of X(2)-X(1), or it takes it as a scalar at every iteration? It t...

Does cummax works in a sde solver?

My question is: does here cummax works on all previous values of X(2)-X(1), or it takes it as a scalar at every iteration? It t...

23 dagar ago | 0

Answered

H have a error in FDM.

F(i+1) = (F(i) + F(i+2))/2 -H(i)*(h/2)*(F(i+1)-F(i)) +(h^2)*(G(i)^2) - (h^2)*(F(i)^2) + (h^2)*(S/2)*((((i*h)+1)/2)*((F(i+...

H have a error in FDM.

F(i+1) = (F(i) + F(i+2))/2 -H(i)*(h/2)*(F(i+1)-F(i)) +(h^2)*(G(i)^2) - (h^2)*(F(i)^2) + (h^2)*(S/2)*((((i*h)+1)/2)*((F(i+...

23 dagar ago | 0

| accepted

Answered

Error using matlab.internal.math.interp1 Input coordinates must be real.

For some reason, the k suggested by "fminbnd" becomes complex-valued so that interpolation in function "valfunsto" is no longer ...

Error using matlab.internal.math.interp1 Input coordinates must be real.

For some reason, the k suggested by "fminbnd" becomes complex-valued so that interpolation in function "valfunsto" is no longer ...

23 dagar ago | 0

| accepted

Answered

Computing Partial derivates of anonymous functions comprised of sum of standard functions

Your code works for me. Maybe you have a MATLAB version where the second argument to "diff" is only interpreted as the order of ...

Computing Partial derivates of anonymous functions comprised of sum of standard functions

Your code works for me. Maybe you have a MATLAB version where the second argument to "diff" is only interpreted as the order of ...

24 dagar ago | 0

Answered

Computing Partial derivates of anonymous functions comprised of sum of standard functions

Stay numerical in your computation and approximate the gradient of your objective function "obj" by finite-difference quotients:...

Computing Partial derivates of anonymous functions comprised of sum of standard functions

Stay numerical in your computation and approximate the gradient of your objective function "obj" by finite-difference quotients:...

24 dagar ago | 0

| accepted

Answered

How do I optimize/find the minimum of a multi-variable function?

If you don't restrict your x- and y- variables to certain lower and upper bounds, the minimum of the function your get from "fit...

How do I optimize/find the minimum of a multi-variable function?

If you don't restrict your x- and y- variables to certain lower and upper bounds, the minimum of the function your get from "fit...

25 dagar ago | 0

Answered

Can I use fmincon with a whole model as function?

I don't see your problem. You call "fmincon" as sol = fmincon(@fun,x0) and write a function "fun" as function obj = fun(x) ...

Can I use fmincon with a whole model as function?

I don't see your problem. You call "fmincon" as sol = fmincon(@fun,x0) and write a function "fun" as function obj = fun(x) ...

25 dagar ago | 0

| accepted

Answered

Regarding choosing correct boundary condition

If you set qL = 1 and qr = 1 and you defined f as f = D*du/dx in the function where you need to specify [c,f,s], you can specify...

Regarding choosing correct boundary condition

If you set qL = 1 and qr = 1 and you defined f as f = D*du/dx in the function where you need to specify [c,f,s], you can specify...

25 dagar ago | 0

| accepted

Answered

How to interpolate 2-parameter dependents matrices?

Use griddedInterpolant or scatteredInterpolant on each matrix element separately depending on whether the point pairs (Vi,qj) fo...

How to interpolate 2-parameter dependents matrices?

Use griddedInterpolant or scatteredInterpolant on each matrix element separately depending on whether the point pairs (Vi,qj) fo...

25 dagar ago | 0

Answered

Mathematical Equations to MATLAB

%Parameters beta = 2; alpha = 200; Ccl = 2000; Cpm = 2500; Rl = 1100; Cren = 50000; delta = 0.223; P = 12; N = 8; Clo...

Mathematical Equations to MATLAB

%Parameters beta = 2; alpha = 200; Ccl = 2000; Cpm = 2500; Rl = 1100; Cren = 50000; delta = 0.223; P = 12; N = 8; Clo...

26 dagar ago | 0

| accepted

Answered

How can I replace NaN in a table with a zero?

https://uk.mathworks.com/matlabcentral/answers/231096-replace-nan-s-in-table-with-zero

How can I replace NaN in a table with a zero?

https://uk.mathworks.com/matlabcentral/answers/231096-replace-nan-s-in-table-with-zero

26 dagar ago | 0

Answered

ODE15i DAE Warning:Failure at t=0.000000e+00. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (0.000000e+00) at time t.

It can be deduced from your equations that the only possible solution for your DAE system is y(i) = 0 for i=1,...,8. Thus you c...

ODE15i DAE Warning:Failure at t=0.000000e+00. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (0.000000e+00) at time t.

It can be deduced from your equations that the only possible solution for your DAE system is y(i) = 0 for i=1,...,8. Thus you c...

27 dagar ago | 0

| accepted

Answered

Solver Stop Prematurely as new equation added

Use an options structure for "fsolve" as options = optimset('MaxFunEvals',100000,'MaxIter',100000) sol = fsolve(...,options) ...

Solver Stop Prematurely as new equation added

Use an options structure for "fsolve" as options = optimset('MaxFunEvals',100000,'MaxIter',100000) sol = fsolve(...,options) ...

27 dagar ago | 1

Answered

Please tell me what corrections can I make when encountering the following error?

We don't know the contents and sizes of the arrays you use. So we are unable to help. This would work e.g. : xspan = linspace(...

Please tell me what corrections can I make when encountering the following error?

We don't know the contents and sizes of the arrays you use. So we are unable to help. This would work e.g. : xspan = linspace(...

28 dagar ago | 0

Answered

Can I solve more than two PDEs in 2D?

If you have a licence for the PDE Toolbox, you can apply it to solve your problem.

Can I solve more than two PDEs in 2D?

If you have a licence for the PDE Toolbox, you can apply it to solve your problem.

28 dagar ago | 0

| accepted

Answered

Iteration method of optimization

That's what I get from your description. But I might have misunderstood something. % Parameters m_values = linspace(0, 1, 100)...

Iteration method of optimization

That's what I get from your description. But I might have misunderstood something. % Parameters m_values = linspace(0, 1, 100)...

28 dagar ago | 0

| accepted

Answered

Error using surf (line 71) Z must be a matrix, not a scalar or vector.

Before your loop insert the commands size(squeeze(ws(:,:,1))') size(we_m) size(sn_m) For surf to work, all sizes must be the...

Error using surf (line 71) Z must be a matrix, not a scalar or vector.

Before your loop insert the commands size(squeeze(ws(:,:,1))') size(we_m) size(sn_m) For surf to work, all sizes must be the...

28 dagar ago | 0

Answered

Unknown variables appearing in solutions for symbolic equation solver

syms x f = x^5+x^4+3*x^2-4; solve(f==0) vpa(solve(f==0)) double(solve(f==0)) I have no explanation for the u that appears i...

Unknown variables appearing in solutions for symbolic equation solver

syms x f = x^5+x^4+3*x^2-4; solve(f==0) vpa(solve(f==0)) double(solve(f==0)) I have no explanation for the u that appears i...

28 dagar ago | 0

| accepted

Answered

¿Por que me aparece el error de Incorrect number or types of inputs or outputs for function applyBoundaryCondition en mi codigo?

Instead of "edges", you have to include the edge number to which you want to apply the boundary condition. I plotted the geomet...

¿Por que me aparece el error de Incorrect number or types of inputs or outputs for function applyBoundaryCondition en mi codigo?

Instead of "edges", you have to include the edge number to which you want to apply the boundary condition. I plotted the geomet...

30 dagar ago | 0