Complex values computed by fit.m function (Curve fitting Tool)
Since your fitting problem is linear in the coefficients a1,a2,a3,..., this is all you need to get the best fit parameters: A =...

25日 前 | 0

Numerical integration of a function containing symbolic characters
syms A B x f = x^2*(A*x+B); result = int(f,x,0,1)

25日 前 | 0

How do I fit a function to data using LSQNONLIN or LSQCURVEFIT?
function main tempodados = [ 0.0000755000 0.0000790000 0.0000825000 0.0000860000 0.0000895000 0.0000930000 ...

25日 前 | 0

Help: Finds difficult in solving this coupled ordinary differential equations using ODE45 ??
Put the constants (a,b,d,..) in your first file.

25日 前 | 0

Axial Dispersion Model, How to solve the following set of equations
Use MATLAB's "pdepe". As boundary condition for q, set pl = 0, ql = 1, pr = 0, qr = 1.

25日 前 | 0

Trouble while using fsolve function
If you have an ellipsoid given as f(x,y,z)=0 and a point P0 on the ellipsoid P0 = (x0,y0,z0), why don't you just use (df/dx(P0)...

26日 前 | 0

I know a certain y1 and I want to find the respective x1.
x1 = fzero(@(z)interp1(x,y,z)-y1,1)

ode23 , matrix equation , 2nd order DE
Convert the system to a first order system and write it as M*y' = f(t,y) Then use the mass-matrix option of the ODE solvers to...

matrix vector multiplication complex number
b = [ 2 ,complex(1,-1)].' instead of b = [ 2 ,complex(1,-1)]'

| 採用済み

How to tell ode15s to change its max time step for a specific short time range?
Integrate from 0 to 0.05, restart the solver and solve from 0.05-0.1, restart the solver and solve from 0.1 - 20. Every time you...

| 採用済み

How can I create a handle-function with a double summation on 201 variables (40401 terms)?
FUN = @(W) (W.*sigma).'*C*(W.*sigma)

| 採用済み

Efficient way to compute a double integral within a double integral
function main l1 = ...; u1 = ...; l2 = ...; u2 = ...; value_outer_integral = integral2(@fun,l1,u1,l2,u2) end ...

| 採用済み

Finding point of intersection between a line and a sphere
Sphere: (x-xs)^2 + (y-ys)^2 + (z-zs)^2 = R^2 Line: [x y z] = Pm + l*normal Thus (Pm(1)+l*normal(1)-xs)^2 + (Pm(2)+l*normal(...

| 採用済み

Numerical integral over the whole spherical volume of a crystallite
Nd = 1e23; phi = 20; Ld = 18e-9; R = 40e-9; fun = @(r) 4*pi*r.^2.*(1-exp(phi + 1/6*(r/Ld).^2)); value_integral = Nd*integra...

| 採用済み

Numerical integration with many parameters.
function main L = 1; T = 100; r = 0.03; I1 = 0.5; p = 0.005; epsilon = 0.5; beta = 0.1; rho = 0.5; ...

| 採用済み

How to write a code for a bounded periodic function?
t(1) = 0; y1(1) = 600; y2(1) = 1000; h = 0.5; t_end = 5; t = 0:h:t_end; a = 2; c = 3; alfa = 10^-3; gamma = 6*10^-3; f...

| 採用済み

Probability distribution of a multiple variable sum
Take samples from your empirical data and use Monte-Carlo-simulation to determine the above probability. This code should help ...

2ヶ月 前 | 1

| 採用済み

How can we provide minimum distance i.e. 20 between each random generated node?
I think Jan Simon's answer will at least partially solve your problem: https://de.mathworks.com/matlabcentral/answers/142322-fi...

2ヶ月 前 | 1

Optimization problem with a function of 2 parameters
TC = @(x) (QC(x(1))+FC(x(2))+ RC)/E(x(2)); lb = [1.5e-5,1000]; ub = [2.5e-5,100000]; sol = fmincon(TC,[2e-5,10000],[],[],[],[...

2ヶ月 前 | 0

| 採用済み

Solve a system of equations
x22 - w0 = x13 = x31 * x32 = x22 * x21 / (x22+k2*V2) * x22 = x22 * (x22/(x22+k1*V1)) / (x22+k2*V2) * x22 This gives a quad...

2ヶ月 前 | 0

| 採用済み

Can anyone help me in coding matlab code for Quadratically Constrained Quadratic Program (QCQP)?
function main H = [2 0 0;0 2 0;0 0 2]; f = [-1; -2 ;-3]; R = [7 0 0;0 7 0;0 0 7]; h = [-4 ;-5 ;-6]; c = 88; ...

2ヶ月 前 | 0

Solving 2nd order ODE with ODE45
M = matlabFunction(V,'vars', {'t','Y'})

2ヶ月 前 | 1

Solving two nonlinear equations
A = 0.5:0.01:2; alpha = 0.5; l00 = 1; for i = 1:numel(A) a = A(i); fun = @(l0) 1 + alpha*l0^(alpha-1) - l0 - alpha*a*(2...

2ヶ月 前 | 1

| 採用済み

How to plot a nonlinear equation using FSOLVE in MATLAB
K = 1:627; kp = 4500; h = 1.0e-3; d = 7.5e-3; ky0 = 1.0; Ky = zeros(numel(K),1); %fKy = zeros(numel(K),1); for i = 1:nume...

2ヶ月 前 | 0

function of integral bound
function main sol = fzero(@fun,1.0) end function res = fun(b) amin = 0; amax = b; xmin = 0; xmax = @(a) a+b...

3ヶ月 前 | 0

| 採用済み

How to redefine a variable inside the function?
Add the nonlinear constraint x(3) - x31*x32 = 0 in function "nonlcon". And remove the lines y33=x31*x32; x13=y33; % It shou...

3ヶ月 前 | 0

| 採用済み

A for loop need help ASAP
for i = 0:3:300 j = i/3 + 1; Fi(j)= atan(-(A5(1,1+i)/A5(1,2+i))); Theta(j) = acos(A5(1,3+i)); Psi(j)= atan(A3(1,3+i)...

3ヶ月 前 | 0

Solving system of ODE with dataset of variables
[t,Ts]=ode45(@(t,Ts)Temp_EH(t,Ts,time,Qin,Qout,Tin,rad,Tair,Vol_hip,Vol_ep,H_ep,AreaThermo,eair,f,dens,Cp,sigma,A,RL,eee,c1,Tran...

3ヶ月 前 | 1

| 採用済み

error in fmincon code
V0 = [1;2;4]; objective = @(V)[-s.',(l-q).']*V; But why do you shoot with canons on sparrows (means: why do you use a nonlinea...

3ヶ月 前 | 0

| 採用済み

How can i find the distance between every point in two different point-clouds
https://de.mathworks.com/help/stats/pdist2.html min (D) or min (D.') seems to be what you are looking for.

3ヶ月 前 | 1

Load more