Réponse apportée
Error: File: untitled5 Line: 19 Column: 1 Function definitions in a script must appear at the end of the file. Move all statements after the "f" function definition to before
Your interval of integration is complex-valued. I used nested functions to make the parameter g visible in your "f". And I ass...

environ 2 ans il y a | 0

Réponse apportée
Error using fmincon and integral2: taking integral variables theta and p as an array while performing computation
Take care that you pass k, c and d1 as values, not as function handles to your objective function. Thus (as in all your questio...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Create "n" non-lineal equations in a loop and solved by Fsolve
n=; pi=; p0=; pn=; Ag=; k1=; k2=; k3=; k4=; factor=(p0-pn)/n; for i=1:n-1 x0(i)=p0-factor*i; end x0(n)=0; ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Boundary conditions in pdepe for 1D parabolic velocity profile
The problem set up below is rho*cp*u_z*dT/dz = 1/r * d/dr (r*k*dT/dr) + Q T(z=0,r) = -40 dT/dr = 0 at r = 0 -k*dT/dr = h*(T-...

environ 2 ans il y a | 0

Réponse apportée
Error using fmincon and integral: taking integral variable as an array while performing computation
[q] = optimizeParameters();% Call optimizeParameters to define the objective function q options = optimset('PlotFcns', @optimpl...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Using Computational Fluid Dynamics CFD in Matlab
Are you sure that these problems are really meant to be solved with "full CFD" ? MATLAB does not have a CFD tool - you will hav...

environ 2 ans il y a | 1

Réponse apportée
Three y axis with one x axis
https://uk.mathworks.com/matlabcentral/answers/459385-multiple-y-axes-on-single-x-axis

environ 2 ans il y a | 0

Réponse apportée
Can not solve system of differential equations with ode45 taking into account continuity equation
Where do you specify the equations for p1L and p1R ? In your vector of time derivatives [dPdt(t, y(3)); dCdt1(t, y(4), y(1)); ...

environ 2 ans il y a | 0

Réponse apportée
Error: using fmincon: FMINCON requires all values returned by functions to be of data type double.
As you can see above, your function returns a symbolic NaN, but it must return a numerical defined value. To change the output ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Difficulties with symbolically integrating Paris law equation
% Numerically DEL_SIG = 180e6; a = 0.1e-3; ac = 28.6e-3; A = 4e-13; expression = @(x)1./(A*DEL_SIG^4*pi^2*x.^2); N = inte...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
triple nested integral with error "Arrays have incompatible sizes for this operation."
Please supply an executable code in order to test your code and reproduce the error. Usually, adding 'ArrayValued',true as an o...

environ 2 ans il y a | 0

Réponse apportée
Nested integrals spends quiet different time to calculate for different input values
Check whether the computations are reliable because of the big span of integration. mu1 = 100; sigma1 = 10; mu2 = 200; sigm...

environ 2 ans il y a | 0

Réponse apportée
Could anyone help me with my matlab bvp4c program?
The order of your functions in the dydy function handle is wrong. It should work now. %I am a Researcher, my problem is i t...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
How can I find the troughs of something without using the function findpeaks?
Use the "diff" function on the array "flow". A peak occurs between flow(i) and flow(i+2) if diff(i) > 0, but diff(i+1) < 0 (m...

environ 2 ans il y a | 0

Réponse apportée
Error Using Optimization with Integer Variables and Non-linear Constraints
Replace norm_h=optimvar('norm_h','Type','integer'); prob = optimproblem('ObjectiveSense','minimize'); prob.Constraints.cons1 ...

environ 2 ans il y a | 0

Réponse apportée
A naive question regarding MATLABs definition of parabolic/elliptical PDEs (pdepe)
https://en.wikipedia.org/wiki/Elliptic_partial_differential_equation Second-order linear partial differential equations (PDEs) ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to find the point that resides on a contour that is closest to a known point?
format long Z = peaks(50)/10; surf(Z) obj = @(x,y)(x-16.35)^2+(y-0.05)^2; nonlcon = @(z)deal([],interp2(0:49,0:49,Z,z(1),z(2...

environ 2 ans il y a | 1

Réponse apportée
The standard implementation of ldl factorization in Matlab does not work correctly
From the documentation: [L,D] = ldl(A) factorizes full matrix A into a permuted lower triangular matrix L and a block ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to optimize the run time in my optimization problem.
I don't see anything obviously wrong in your coding - except for the last term in MTE_i which should be (TotalProduct(6)-Exper...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
I'm getting the 'Not enough input arguments' error event though I am pretty sure I am giving all the arguments needed at all times
format long [x,it] = NewtonSystemSolver(5, 10^-12, 100, [5e4,0,0,0,5e4].', @Slammer1, @Slammer1Jacobian) Slammer1(x) function...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
ode15s giving integration tolerance error and loop stopping at zeroth iteration
The evaluation of the variable "ros" for your vector of initial conditions y0est gives NaN. The reason is that you start with mL...

environ 2 ans il y a | 0

Réponse apportée
Multiple iterations for plotting
Maybe you mean h= 0.5; b = 0.5; d1= 0.474; d2= 0.035; As= 2512*10^-6; Asc= 2512*10^-6; fy= 400*10^6; Es= 200*10^9; fc...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
There is a matrix operation, A*B=c. would there be a way to find a specific elemetn in C and call out variables that were involved in the calculation of the specific element
Since you set C = A.*B and not C = A*B, the elements that influence the value at position (i,j) in C are the elements (i,j) in A...

environ 2 ans il y a | 0

Réponse apportée
Set up a gradient descent algorithm for a multivariable economic dispatch problem
There must be something wrong in the computation of t in your code. For t=1, the usual gradient descent works: clc; clear; sym...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Setting Boundary Conditions & Using bvp4c
xcastle = 20; % x-coordinate of target v0 = 20; % Prescribed (...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Solving ODE system with a constraint/boundary condition
p_A + p_B should remain constant since dp_A/dz + dp_B/dz = 0 according to your equations. But this is not the case for p_A + p_...

environ 2 ans il y a | 0

Réponse apportée
How do I write time dependent variables in my equations of motion?
Integrate from 0 to 5 with F = 0, Vin = 280. Restart with the solution obtained and integrate from 5 to 10 with F = -10, Vin = ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
What is the mathematical form called for PDEs used with the MATLAB function pdepe?
Would this be considered an elliptical/parabolic PDE in conservative form? No. "Conservative" usually refers to the first spati...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
Energy optimization robot paths
toolPositionHome = T_home(1:3,4); % Define a Set of Waypoints Based on the Tool Position waypoints = toolPositionHome + ... ...

environ 2 ans il y a | 0

Réponse apportée
I'm having an issue defining the initial conditions for solving a system of differential equations
You have two second-order ODEs for th and w. Thus you need 4 boundary conditions (not 6) that can be prescribed for w, dw/dx, ...

environ 2 ans il y a | 1

| A accepté

Charger plus