Beantwortet
How to find the intersection values?
format long d1 = 0.4;d2 = 0.6;d = d1 + d2; n1 = sqrt(12);n2 = 1; D1 = @(lambda)(2*pi*n1*d1)./lambda;D2 = @(lambda)(2*pi*n2*d2...

fast 3 Jahre vor | 0

Beantwortet
2nd order differential equation with two 1st order differential equations boundary condtions
This is the code for the equation and boundary conditions you posted: xmesh = 6:0.005:6.5; solinit = bvpinit(xmesh, [6.55 0.57...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
What can I do if Matlab never stops calculating a system of equations?
I'd suggest you don't use the symbolic toolbox for your problem, but to define an optimization problem: min: any function you l...

fast 3 Jahre vor | 0

Beantwortet
Solve the integral in the point where the function is singular
I'd suggest syms x func1_symb=sqrt(0.025)/(8*sqrt(pi*(x-x_approach(1)))); value_integral = 0.0; for i = 1:numel(x_approach)-...

fast 3 Jahre vor | 0

Beantwortet
Solving a problem with the Shooting Newton Method in Matlab
sol = fsolve(@fun,23,optimset('TolFun',1e-12,'TolX',1e-12)); fun(sol) [X,Y] = ode_solver(sol); figure(1) hold on plot(X,Y(:...

fast 3 Jahre vor | 0

Beantwortet
Doubt in a program
Why ? In order to plot a time-location curve after the while-loop, the intermediate results for time and location are saved in ...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
2D diffusion equation for a laser heat source
qdot is 1x51, T(Sy,Sx) is a scalar. Thus Tn(Sy,Sx)=Tn(Sy,Sx)+dt*q_dot/rho/cp; tries to assign an array to a scalar which thro...

fast 3 Jahre vor | 0

Beantwortet
yy3 is generating a straight line while it should generate a curve, i don't understand what is wrong!!!
As initial condition for y(7), you set y(7) = 0, and you define the differential equation for y(7) as dy(7)/dx = y(7). The solut...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solve non linear equation with vector
x(k1) = 45+dados.mass(k1)*sqrt(-2*log(dados.par(k1))) or x(k1) = 45-dados.mass(k1)*sqrt(-2*log(dados.par(k1)))

fast 3 Jahre vor | 1

Beantwortet
Heat Flow in PDEToolbox: Uniform Heat Flux does not give uniform temperature.
Either you presribe heat flux or convection coefficient and ambient temperature on Face 3. I don't understand how both options c...

fast 3 Jahre vor | 0

Beantwortet
Exponential fitting of data not working
A = load("T_A.mat"); A = A.T_A; A = [linspace(0,83.3,1666).',A]; plot(A(:,1),A(:,2),'o') hold on p0 = [25 1 1]; f = @(p)p(...

fast 3 Jahre vor | 0

Beantwortet
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 0-by-1.
rand(-1,1) tries to create a matrix of uniformly distributed random variables on [0,1] with dimensions -1 and 1. A negative matr...

fast 3 Jahre vor | 0

Beantwortet
How to calculate empirical cumulative distribution function of a dataset? If I use ecdf function then why the number of datapoints are decreasing? Is there any other formula?
If I use ecdf function then why the number of datapoints (the matrix f1 becomes (1564x1) and x1 becomes(1564x1) matrix) are decr...

fast 3 Jahre vor | 0

Beantwortet
Hello folks, I need help regarding visualization of solutions for a transient thermal analysis done using PDE solver on a 3D geometry.
ad 1) Face 2 is an internal boundary. You don't need to set a boundary condition on it. The internal boundary condition is T_le...

fast 3 Jahre vor | 0

Beantwortet
Nonlinear overdetermined equation systems
By using "lsqnonlin", e.g. sol0 = [0 0 0 0]; sol = lsqnonlin(@fun,sol0) norm(fun(sol)) function res = fun(u); x = u(1);...

fast 3 Jahre vor | 0

Beantwortet
can anyone help me about Error using optim.problemdef.OptimizationProblem/solve Invalid argument at position 2. Value must be finite.
Above your error - written out more clearly so that you as the coder should be able to understand the problem. In nodestr=dec...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Problem to solve nonlinear Eq. with Newton's Method
i=sqrt(-1); n1=1; n3=1.515; lambda=632.8; %nm alpha0=-deg2rad([50 55 60]); teta1=deg2rad(50); phi0 =deg2rad([75.357 68...

fast 3 Jahre vor | 0

Beantwortet
How to plot two concentric spheres with radius1=1 and radius2 =10 in MATLAB and filled with fluid flow (I have one velocity component only)
lambda=1.5; eta=1; beta1=10;beta2=10; alpha=.00001; eta1=0.0;w=0.1;k=(1/eta.^2).^(0.5); a=1; % w=w2/w1 alpha1=((k.^2+(k....

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to plot two concentric spheres with radius1=1 and radius2 =10 in MATLAB and filled with fluid flow (I have one velocity component only)
I'm surprised that velocity increases with growing r. Continuity equation should force velocity to decrease. But maybe my parame...

fast 3 Jahre vor | 0

Beantwortet
levenberg-marquardt with linear constraints
x = lsqnonlin(fun,x0,lb,ub,A,b,Aeq,beq,nonlcon) A,b,Aeq,beq define the linear constraints.

fast 3 Jahre vor | 2

Beantwortet
measurement based optimization using fmincon
"fmincon" is not a stochastic, but a deterministic optimizer. You are not allowed to use random inputs for it that change every ...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Error: Limits of integration must be double or single scalars. While solving equations numerically with symbolic integral limits
I guess this is what you mean. initial_guess = [0.5, 0.1, 2]; % Use fsolve to solve the equation system result = fsolve(@(var...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
nonconformant arguments (op1 is 1x1, op2 is 0x0)?
Works for me (see above). Although the solver doesn't seem to be successful. You forgot to include the "global" line in the scr...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
Get the same value when using Integral2 function
As I already tried to explain, v_induced and v_slipstream are only formal parameters for the integral2 function. They cannot tra...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Adding 2D array to 3D array within loop
totalarray = rand(365,721,1440); newdata = rand(721,1440); squeeze(totalarray(1,:,:)) newdata for i = 1:365 totalarray(...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
the value i am calling for from a matrix isnt changing although index is changing
You forgot to reset e to 1 after the while-loop.

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Error of "Integrand output size does not match the input size."
As written, Oper.rho .* (v_induced ./ Oper.Vinf) .* 0.5 .* (Oper.Vinf^2 - (v_induced .^2)); and Oper.rho .* (v_slipstream ./ ...

fast 3 Jahre vor | 1

Beantwortet
Not able to get real solution through syst solve
Always plot the functions before solving for common points and set initial values for the variables according to what you see in...

fast 3 Jahre vor | 0

Beantwortet
Fixed bed adsorption using pore diffusion model
The "dq/dt" in equation 2 is the change of mass of q in the particle with respect to time. If you set q_in_particle = integral_...

fast 3 Jahre vor | 0

| akzeptiert

Mehr laden