Réponse apportée
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...

environ 2 ans il y a | 0

Réponse apportée
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+...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 2 ans il y a | 0

Réponse apportée
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:...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 2 ans il y a | 0

Réponse apportée
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) ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
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

environ 2 ans il y a | 0

Réponse apportée
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...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Solver Stop Prematurely as new equation added
Use an options structure for "fsolve" as options = optimset('MaxFunEvals',100000,'MaxIter',100000) sol = fsolve(...,options) ...

environ 2 ans il y a | 1

Réponse apportée
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(...

environ 2 ans il y a | 0

Réponse apportée
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.

environ 2 ans il y a | 0

| A accepté

Réponse apportée
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)...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 2 ans il y a | 0

Réponse apportée
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...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
¿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...

environ 2 ans il y a | 0

Réponse apportée
Fitting multiple curves with multiple data sets, partial and globally shared parameters using lsqcurvefit
rng("default") b1 = 1; b2 = 0.85; b3 = 2.5; b4 = 1.1; b5 = 2.2; b6 = 4.5; b7 = 1.3; b8 = 7.2; b9 = 9.5; b10 = 0.5; %x data ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Why is this matlab program not able to solve accurately?
Some equations cannot be solved analytically because they are too complicated or because there are no functions available that c...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
I want to perform this time derivative?
From your description, you have 412 different dV_c/dt curves over time, one curve for each distance X. And now ? Do you want to...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
NLP problem with fmincon: Non-differentiable point in objective function
The solution variables for "fmincon" must be continuous in order to compute gradients, Hessians etc. Therefore, the solver is no...

environ 2 ans il y a | 0

Réponse apportée
solving nonlinear wave equation
Using the method of characteristics, you get the equations dt/ds = 1 dx/ds = v_max*(1-2*rho/rho_max) drho/ds = 0 You should ...

environ 2 ans il y a | 2

| A accepté

Réponse apportée
Is it possible to create a distribution fit (preferably gaussian mixture distribution model) for a distribution with precalculated bincounts?
The bincounts define a probability distribution. Draw random numbers from this distribution - they can be used as data in "fitdi...

environ 2 ans il y a | 0

Réponse apportée
How can i solve this eqaution in matlab?
I still don't understand where you can change t=0.1 s, t=20 s, t=60 s, but here we go: Rho_f = 920; %kg/m^3 Dp = 0.152; % m m...

environ 2 ans il y a | 0

Réponse apportée
How can i solve this eqaution in matlab?
Rho_f = 920; %kg/m^3 Dp = 0.152; % m m_dot_oxi = 7.95; %kg/s n = 0.75; m = -0.15; a = 2.006e-5; Rp = Dp/2; % m A = pi*(Rp...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Finding accurate inverse of binary circulant matrix
BCM=readmatrix('MixingLayer.xlsx'); inv(gf(BCM,2))

environ 2 ans il y a | 0

| A accepté

Réponse apportée
finding value in 2d array function of x and y
Given (vehicle.wheeltorque ,vehicle.wheelspeed), use pdist2 to compute the distances to the column vectors of the matrix [Torque...

environ 2 ans il y a | 0

Réponse apportée
How do I sort these 2D-Points to get a proper surf plot of this function
x = linspace(-1,1,1000); y = linspace(-1,1,1000); [X,Y] = meshgrid(x,y); Z = nan(size(X)); idx = X.^2+Y.^2 <= 1; Z(idx) = 1...

environ 2 ans il y a | 1

| A accepté

Charger plus