Answered
optimization of delayed differential equations (dde)
Make the best of it. pTrue = [1 1 1 1 1 1 1 1 1]; time = 0:7; Y = ...; Am1=[1,1.1,1.4,0.7,0.8,1.6,2,1.5]; Bm1=[1.5,1.0,0....

4 years ago | 0

| accepted

Answered
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-2000.
Setting b01(t) = b01 + gamma(t); b02(t) = b02 + gamma(t); b = b01 + b02; makes b01, b02 and b to arrays of size 1x2000 sinc...

4 years ago | 0

| accepted

Answered
Hello everyone I'm new, can some help me little bit with my problem. I need to sum free Fourier together.
x = 0:100; F1 = feval(f1,x); F2 = feval(f2,x); F3 = feval(f3,x); SS = F1 + F2 + F3; plot(x,SS) coefficientValues1 = coef...

4 years ago | 0

| accepted

Answered
Newton Raphson for Backwards Euler on System of differential equations
y0(1,1) = 0; y0(2,1) = 1; x = 0:0.01:2*pi; h = x(2)-x(1); y = zeros(2,numel(x)); y(:,1) = y0; for i4 = 1:...

4 years ago | 0

| accepted

Answered
How to solve system of trigonometric equations?
Since you have a nonlinear system of equations, you must use a nonlinear solver and not a linear solver as you did: F = @(x,y,z...

4 years ago | 0

| accepted

Answered
Solving a polynomial function using the solve function is not working
eqn = x^3 - 2*x^2 - 5*x + 6 == 0; solve(eqn,'MaxDegree',3)

4 years ago | 0

Answered
What are some Taylor series commands?
https://de.mathworks.com/help/symbolic/sym.taylor.html

4 years ago | 0

| accepted

Answered
New to MatLab: How to enter given data for a random variable (&find /fit distribution function)
n = 30; sample = random(n) function sample = random(n) uniform = rand(n,1); sample = zeros(size(uniform)); for i = ...

4 years ago | 0

Answered
I need help with fourier matrix index integral, I can't find how to write it in matlab
n = 50; T=20*10^-3; t=0:T/1000:T; w=2*pi*1/T; f=@(t)0+100.*(t>1*T/12).*(t<5*T/12)-100.*(t>7*T/12).*(t<11*T/12); a0 = 2/T*in...

4 years ago | 1

| accepted

Answered
How to solve this differential equation inside derivation are there
Execute this code separately and copy the expressions obtained for az1 and bz1 into your code from above. If you want more vari...

4 years ago | 0

Answered
how to plot solution of ODE eqution with out using fplot ?
Vsol = matlabFunction(VSol); t = 0:0.001:5; plot(t,Vsol(t))

4 years ago | 0

Answered
Volume Monte Carlo Method
I'm surprised that the sphere is characterized as sphere = @(X) heaviside(ones(size(X,1),1) - X(:,1).*X(:,2).*X(:,3)); For me ...

4 years ago | 0

Answered
How i can solve limit this ODE question .
I think you mean lim (t->oo) P(t) instead of lim (x->oo) P(t) don't you ? Seems the limit is not 0, but 1e6: https://www....

4 years ago | 0

Answered
three curve at different x values
plot(x(x<=41.1),blue_curve(x<=41.1))

4 years ago | 0

| accepted

Answered
Plotting the transient temperature profile of a 2D grid using finite-difference solver
Order the temperatures in the grid points (e.g. T11, T12,T13,...,T1_nx,T21,T22,...,T2_nx,...,T_ny,1,T_ny,2,...T_ny,nx). Write...

4 years ago | 0

Answered
Probability distribution (between zero and 1)
Figure 2 with the ksdensity command is exactly what you need. The y-axis never represents probability in the plot of probabilit...

4 years ago | 0

Answered
How to use for loop to iterate over the elements of the initial matrix and keep just the ones in the diagonal.
D =[R(1,1);R(2,2);R(3,3)] or D = zeros(3,1); for i=1:3 D(i) = R(i,i); end What's the problem ?

4 years ago | 1

| accepted

Answered
Fourier coefficients of a function
syms x omega n f = 0.5*(sin(x)+abs(sin(x))); F(omega) = int(f*exp(1i*omega*x),x,-pi,pi) n = 10; g = real(F(0))/(2*pi) + sum(...

4 years ago | 0

Answered
Implementation of 2D advection equation with second order upwind scheme?
Formally, your implementation is correct as it is (I did not check the one-sided difference formulae in detail). The problems I...

4 years ago | 0

| accepted

Answered
Help solving differential equations
syms k0 k1 A0 A(t) B(t) E(t) eqns = [diff(A,t)==-k0*A,diff(B,t)==k0*A-k1*B,diff(E,t)==k1*B]; conds = [A(0)==A0,B(0)==0,E(0)==0...

4 years ago | 0

Answered
solve a symbolic system of simultaneous matrix equations
P=[0,1,0;1/3,1/3,1/3;0,1,0]; A=sym('A', [3 3]); B=sym('B', [3 3]); C=sym('C', [3 3]); I=eye(3); eqns = [I==...

4 years ago | 1

Answered
Stuck at Gauss-Newton Method code
Change j(i,2)=a0*a1*exp(-a1.*x(i)); to j(i,2)=a0*x(i)*exp(-a1.*x(i)); and xx=linspace(x1,x2,100); yy=(a0*xx).*(1-exp(-a1*x...

4 years ago | 0

Answered
Polar Surface Numerical Integration
If your matrix for the surface values is S = s_ij with s_ij = s(r(i),theta(j)) you can get the volume under the surface as V = ...

4 years ago | 1

Answered
How to define event function in ode45 solver as the slop of variable achieve certain value?
Maybe someone could answer if he/she knew what z is in your code. Is it y(1), y(2) or y(3) ? Anyhow: The slopes of your variabl...

4 years ago | 1

| accepted

Answered
Variable f coeffficient depends on x for linprog
According to that some of x variables should be less than zero and some of them should be greter than zero. So, I think I need ...

4 years ago | 0

Answered
Interpolation from a table by using two variables
X = 0:3000:6000; Y = 0:0.1:2; Z = [0 0 0 0.4340 0.45120 0.47110 0.39540 0.40990 0.42670 0.37520 0.38850 0.4036...

4 years ago | 1

Answered
Numerical integration and Laplace inverse of complex symbolic expression
You can't use "vpaintegral" because your function "cdffun" depends not only on x and y, but also on r. Thus a numerical approx...

4 years ago | 0

Answered
I want to solve a set of double pendulum odes
And you are really optimistic that such a complicated system of differential equations could have an analytical solution ? It's...

4 years ago | 0

Answered
find the s1 and s2
A = eye(m) + D; minValue = min(A(:)); % Find all (row, column) pairs where A = the min value. [rows, columns] = find(A == min...

4 years ago | 0

| accepted

Answered
I am tasked to solve the equation in the figure for T(x) and then plot the temperature distribution through the sppon.
The underlying differential equation is lambda*V*d^2T/dx^2 = alpha*A*(T-T_inf) with boundary conditions T(0) = Tb, dT/dx(L) =...

4 years ago | 0

Load more