Answered
Nested Numerical Integration with multivariable functions
d=.01; %1/e patch diameter; D=.35; %Aperture Diameter L=7e3; %Propagation distance; coeff=-11.64*(16/pi)^2*D^(-1/3); fun = ...

2 years ago | 1

| accepted

Answered
How to handle interface boundary condition in convection-diffusion reaction equation for pressure, velocity and concentration equation?
If the interface conditions are continuity of the variable and the flux, the finite element method will automatically respect th...

2 years ago | 1

| accepted

Answered
How to obtain an array of the indices from the original array when using nchoosek
You better get B from C, not C from B: A = [7, 8, 9]; v = 1:numel(A); C = nchoosek(v,2) B = A(C)

2 years ago | 1

Answered
How to find the intersection values of line and curve?
https://uk.mathworks.com/matlabcentral/answers/2009582-how-to-find-the-intersection-values?s_tid=srchtitle

2 years ago | 0

Answered
Integration with multiplication of whittaker and bessel function
MATLAB is not able to get an explicit antiderivative for "kr_real". That's why "int" returns the integral expression unchanged -...

2 years ago | 0

Answered
How do I fit two function in a same data at a time depending on the range ?
t = load("t.mat"); t = t.t; y = load("y.mat"); y = y.y; value_min = Inf; for i = 1:numel(t) fun1 = @(time)time.^2; ...

2 years ago | 0

| accepted

Answered
problem with fmincon: constraints are not satisfied
You cannot define your constraints in the objective function. Thus "c" and "ceq" are not used by "fmincon". To account for them,...

2 years ago | 1

Answered
Averaging data from seconds to three seconds because of different time variables
I'd repeat the data for 3 seconds three times. This does not manipulate your data with interpolation or averaging.

2 years ago | 0

| accepted

Answered
Plotting the outcome of a 3D fit
x = 0:0.1:1; y = -1:0.1:1; [X,Y] = meshgrid(x,y); Z = X.^2+Y.^2+0.1*(-1+2*rand(size(X))); [Xout,Yout,Zout] = prepareSurfaceD...

2 years ago | 0

| accepted

Answered
Goodness of fit for weibull distribution
https://www.spcforexcel.com/knowledge/basic-statistics/deciding-which-distribution-fits-your-data-best https://stats.stackexcha...

2 years ago | 0

Answered
How can I generate a vector like this 1,2,2,3,3,3,4,4,4,4 by using for loop?
Start with y = [] and in each step of the for-loop running from 1 to n, concatenate y and i*ones(1,i).

2 years ago | 0

| accepted

Answered
Hello, I have problem with odeToVectorField in ODE second order system of equations.
dydt = fun(0.1,ones(12,1)).' function dydt = fun(t,y) g= 9.81; m= 0.468; Ix= 4.856e-3; Iy= 4.856e-3; Iz= 8.801e...

2 years ago | 0

| accepted

Answered
Why am i getting the error 'The first input to exist must be a string scalar or character vector' while solving 4 ode using ode45 solver ??
ode45 is a numerical integrator. It doesn't accept symbolic inputs. b = deg2rad(45); tspan = [0 pi]; y0 = [0.10 3.14e-06 1.4...

2 years ago | 0

Answered
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...

2 years ago | 0

Answered
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...

2 years ago | 0

| accepted

Answered
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...

2 years ago | 0

Answered
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)-...

2 years ago | 0

Answered
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(:...

2 years ago | 0

Answered
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 ...

2 years ago | 0

| accepted

Answered
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...

2 years ago | 0

Answered
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...

2 years ago | 0

| accepted

Answered
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)))

2 years ago | 1

Answered
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...

2 years ago | 0

Answered
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(...

2 years ago | 0

Answered
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...

2 years ago | 0

Answered
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...

2 years ago | 0

Answered
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...

2 years ago | 0

Load more