Answered
How to integrate a function over an implicitly defined domains
I'd define the function to be integrated as f .* (g>0) and integrate over the rectangular domain. Here, g is the function that i...

2 years ago | 2

Answered
simulation of program in matlab
M2_eq = 1; D2_ov = 1e-2; m=2; x = linspace(0,1,100); t = linspace(0,2,10); u = pdepe(m,@(x,t,u,DuDx)eqn1(x,t,u,DuDx,D2_ov),...

2 years ago | 0

Answered
Error when using lsqnonlin in for loop
As you can see, the dimension of "distances" is only 1x4. But it should be 100x4. And better use objective_function = @(p5) [ ...

2 years ago | 1

| accepted

Answered
simulation of program in matlab
Use MATLAB's "pdepe".

2 years ago | 0

Answered
Integral with limit variable
Note that t is at the same time integration variable and upper limit of the integral. That's confusing. You should rename one of...

2 years ago | 0

| accepted

Answered
i have been trying to solve 50 nonlinear equations simultaneously
epsilon = 0.2; N = 0.5; L = 1; bvpfcn = @(x,y)[y(2);(-epsilon*y(2)^2+N^2*y(1))/(1+epsilon*y(1))]; bcfcn = @(ya,yb)[ya(2);yb(...

2 years ago | 0

Answered
i have been trying to solve 50 nonlinear equations simultaneously
Does the approximate solution below look correct ? Note that you don't set F(49) in your code. clc clear all mata=zeros(1,50...

2 years ago | 0

Answered
Determining the coordinates of a node between two known nodes and knowing the distances between the known nodes
There is only a unique solution for this problem if AC + CB = AB. In all other cases, you either get no solution (AC + CB < AB) ...

2 years ago | 3

Answered
Probolem when using fmincon :The solver starts from a feasible point but converges to an infeasible point
It means that the point "fmincon" converges to might have a lower value of the objective function than the initial point x0, but...

2 years ago | 1

Answered
Does this error indicate that I need the Phased Array System Toolbox to execute this calculation?
https://uk.mathworks.com/help/matlab/ref/matlab.codetools.requiredfilesandproducts.html

2 years ago | 0

Answered
Output 0x1 sym solving a system of equations
It seems your system of equations is inconsistent (it results in 0 = -1 for the fourth equation) : clear clc close all F1_NF...

2 years ago | 1

Answered
MatLab solves BVP with only left-hand side boundaries (How?)
A system of odes needs as many boundary conditions as the sum of the degrees of its equations. Since all your equations are firs...

2 years ago | 0

| accepted

Answered
How to use fsolve to solve matrix equations involving matrices of different dimensions?
Your equations are linear in the unknowns - so you should use a linear solver, not a nonlinear one like "fsolve": % Calibration...

2 years ago | 0

| accepted

Answered
How do I incorporate an interval ?
Add the line maxmin = maxmin(maxmin>-2 & maxmin<1) to your code.

2 years ago | 1

| accepted

Answered
How to introduce 2nd order derivative term in pdepe?
If all the second-order spatial derivatives in your equation can be written in one expression as d/dx(f(x,t,I,dI/dx)*dI/dx) with...

2 years ago | 0

| accepted

Answered
Genetic algorithm optimization tool not accessing the objective function
As you can see from the result, ga never seems to execute the "if" condition in your objective. I don't know why you test for t...

2 years ago | 0

Answered
Lognormal Fitting with the Pore Size and its Probabilities
Counts = [71 73 53 77 79 141 158 237 360 594 958 1659 3094 7183 19034 40051 125001 143248 164224 168209 172406 167600 160578 146...

2 years ago | 1

Answered
What is the specific calculation formula for the smoothness function in Matlab navigation toolbox?
Did you read the reference article ? [1] Lindemann, Stephen R., and Steven M. LaValle. "Simple and efficient algorithms for com...

2 years ago | 1

Answered
Difference in getting symbolic integral result
If you had specified a definite integral, the results would have been the same. Indefinite integrals are only unique up to an a...

2 years ago | 1

| accepted

Answered
A Maximum Likelihood estimation with fminunc
By the way: Why do you iterate the solutions obtained from fminunc ? EInitial_xt = xlsread('Exposures.xls'); E_xt = EInitial_...

2 years ago | 1

| accepted

Answered
an example of using ode15i
[t,y] = ode15i(@odefun_try,tspan,y0,yp0); instead of [t,y] = ode15i(odefun_try,tspan,y0,yp0);

2 years ago | 0

| accepted

Answered
How to vectorize the given code?
u = [1, 2, 30, 50];b=u; dim = length(u); N=dim; s_u = u(1:dim/2)'; angles_u = u((dim/2)+1:end)'; s_b = b(1:dim/2)'; angle...

2 years ago | 0

| accepted

Answered
Condition based integration in MatLab
syms r R rp real positive G(r,rp) = piecewise(r<rp,1/rp,r>=rp,1/r); int(rp^2*G(r,rp),rp,0,R)

2 years ago | 1

| accepted

Answered
Plotting inequalities on the complex plane
It's only left to decide whether it's inside or outside ... z = @(x,y)x+1i*y; f = @(x,y)abs(1+z(x,y)+z(x,y).^2) - 4; fimplici...

2 years ago | 0

| accepted

Answered
Maximum Likelihood estimation with fminunc
D_xt(8162) = 0, and the log of 0 gives NaN. This causes problems for "fminunc". So you should either delete rows where E_xt = ...

2 years ago | 1

| accepted

Answered
How can I plot the graph with the highest, lowest and middle values?
Yes, I corrected one mistake in your code, but I also wrote that I don't think that the curves in the image were produced the wa...

2 years ago | 0

Answered
How can I plot the graph with the highest, lowest and middle values?
Add the lines [FLH,I] = sort(FLH); Lower_LCOH_SOEC = Lower_LCOH_SOEC(I); Upper_LCOH_SOEC = Upper_LCOH_SOEC(I); Mean_LCOH_S...

2 years ago | 0

Answered
lsqcurvefit not working with coupled ODE Function
Use pfit = lsqcurvefit(@(param_vector,tspan) optimization_beer_fermentation(param_vector, tspan, y0), init_parameters, t_data, ...

2 years ago | 0

Answered
Calculate angles correctly between two vectors using the dot product.
I think an intuitive way is to compute the angles between the positive x-axis and the respective vector counterclockwise first (...

2 years ago | 0

Answered
Problem in solving matrix diiferential equation using ode45?
syms t tau_1(t) tau_2(t) tau_3(t) tau_4(t) tau_5(t) tau_6(t) tau_7(t) tau_8(t) tau_9(t) tau_10(t) tau_11(t) v = transpose([tau_...

2 years ago | 1

Load more