Answered
Trying to calculate a function with several integrals
You won't get an analytic expression for the density of the convolution of the normal distribution and the Weilbull distribution...

3 years ago | 0

| accepted

Answered
how can I find the surface area and the volume through this code?
v =[2;0;1;9;0;1;3;0;1]; m = max(v); n = mean(v); f = @(x)(3+sin(m*x)+cos(n*x)); x = -2*pi:0.01:2*pi; plot(x,f(x)) df = @...

3 years ago | 0

Answered
ODE45 Iterations details
Display time and sol values either in a function "OutputFcn" or - quick and dirty - directly in "fun" during the solution proces...

3 years ago | 0

Answered
How to use CVX in matlab code?
Use intlinprog. No need to linearize anything - your equations are linear in the unknowns.

3 years ago | 1

Answered
How to solve this symbolic nonlinear equation
It seems no zero exists: syms X Z A X=2-sqrt(4-2*A); Z=2/A-sqrt(4-2*A)/A; H1 = [0 -1 -1; 1 A 0 ; Z 0 X-4]; [V1,D1] = eig(H1...

3 years ago | 0

Answered
Shooting method ode45 Fzero
Your code tries to determine dT/dt at t=0 such that the solution of the equation d^2T/dt^2 = ((280*exp(-((t-L/2)^2))+(dT/dt)/3)...

3 years ago | 1

| accepted

Answered
Why did I get this error in my code "Array indices must be positive integers or logical values"?
clear; clc; M = 4.316e-3; %equivalent mass for PEH K = 9.894; %equivalent stiffness for PEH C = 0.0096; ...

3 years ago | 0

| accepted

Answered
Why Matlab could not solve a set of linear differential equations with initial conditions through dsolve?
The eigenvalues of a polynomial of degree 14 (=degree of ODEs * number of ODEs) are required to get an analytical solution for y...

3 years ago | 1

| accepted

Answered
How do I run an ODE on a function with multiple variables?
[T,Y] = ode45(@(t,y)eliminationODE(y(1),y(2),y(3),y(4),y(5),y(6),y(7),y(8),y(9),y(10),y(11),y(12),y(13)),[1 100], [0.4,0.016,dpo...

3 years ago | 0

Answered
Index in position 1 is invalid. Array indices must be positive integers or logical values.
dt = 1; d = 0.25; e = 1; t(1) = 0; H(1) = 6; n = 1; f = @(t,H)(-pi*d^2/(4*(-9.5883*H^5+110.5*H^4-340.17*H^3+124.71*H^2+202...

3 years ago | 0

| accepted

Answered
How do I create a matrix from another matrix excluding values?
Example = [ 5 0 2022 820 7 1 820; 5 1 2022 813 4 9 805; 5 2 2022 808 0 0 822; 5 3 2022 809 2 9 812; 5 4 ...

3 years ago | 0

Answered
solving 3 nonlinear equations including max function
a_old = 0.5; b_old = 0.25; c_old = -3.0; err = 1.0; itermax = 100; iter = 0; while err > 1e-6 && iter < itermax iter ...

3 years ago | 0

Answered
2D transient heat conduction in a rectangular plate
In the computation of the second-order derivatives in x and y direction, you don't use that the temperature at the boundaries is...

3 years ago | 0

| accepted

Answered
Moving boundary conditions (material regressions) for PDE
Your equation du/dt = k * d2u/dx2 + dr/dt * du/dx seems to be written in cartesian, not in cylindrical coordinates. The usua...

3 years ago | 0

Answered
Find the set of eigenvectors of a 4x4 matrix elements whose matrix elements have some VARIABLE PARAMETERS.
I set a = sqrt(750*B*N) in the below code. So for every combination of B and N, it gives you the eigenvalues (diagonal of D) and...

3 years ago | 1

Answered
optimization of a function with array of parameters using matlab solver ga
E_opt = optimvar('E_opt',7,'Lower',0,'Upper',+1); instead of E_opt(1)=optimvar('E_opt(1)','Lower',0,'Upper',+1); E_opt(2)=opt...

3 years ago | 0

Answered
My code is related to the 12-6 lennard jones potential . we have to find the density and the effect of cutoff radius on it. I am facing issue while running the code.
You can't plot one single value (density) against a matrix (cutoff). cutoff = [1 4 ; 3 -pi]; density = 2; plot(cutoff,density...

3 years ago | 0

Answered
solving nonlinear equation including max function
options = optimset('TolX',1e-10,'TolFun',1e-10); fun = @(x,y)[x - max(0.9*y,-1+0.9*x);y - max(2+0.9*x,2+0.9*x)] sol = fsolve(@...

3 years ago | 0

| accepted

Answered
Please help fix the syntax for my plot.
Example = [ 5 27 2022 820 827 785 820; 5 28 2022 813 824 801 805; 5 29 2022 808 835 804 822; 5 30 2022 809 835...

3 years ago | 0

Answered
How to solve given system of ODE and PDE
Discretize d^2/dx^2 (sigmaEffective/sigmaY)^m * rho_m and solve the resulting system of ordinary differential equations using OD...

3 years ago | 1

Answered
How to fit a defined function?
A simpler way for this problem, but I guess your "real" model is more complicated: x = [1 2 3 4 5]'; % x data y = [.8 4 10 18...

3 years ago | 0

Answered
I'm always getting an error in line 3 saying not enough input argument
See the example "Solve Nonstiff Equation" under https://de.mathworks.com/help/matlab/ref/ode45.html t0 = 0; tf = 20; x0 = ...

3 years ago | 0

Answered
Remove the loop from a sum of index expression
Here is a loop in disguise: n = 5; m = 10; M = randn( m, m ); J = randi( n, m, m ); V = arrayfun(@(i) sum( M( J == i ) ),1:...

3 years ago | 1

Answered
Quadratic assignment problem in matlab
https://de.mathworks.com/matlabcentral/fileexchange/53110-quadratic-assignment-problem-qap-using-ga-pso-and-fa

3 years ago | 0

Answered
Optimization - non-linear eqn. genetic algorithm
Your problem is linear - thus use linprog instead of ga: f = -[ 1 1 1 1]; A = [0.8 0.2 0 0;0 0 0.45 0.55;-0.8 -0.2 -0.45 -0.55...

3 years ago | 0

Answered
How to explain a difference in solutions of integrals between MATLAB and MAPLE?
https://www.wolframalpha.com/input?i=integration&assumption=%7B%22C%22%2C+%22integration%22%7D+-%3E+%7B%22Calculator%22%7D&assum...

3 years ago | 0

Answered
Maximize Linear Programming using linprog Problem is unbounded?
For M >= 4, choose x1 = 0, x2 = M/2 , x3 = M Then x = [x1,x2,x3] is feasible and the value of the objective is 3/2*M which can...

3 years ago | 0

Answered
how do I index within symfun matrix?
syms f(x) [1 2] f f(1) Therefore what it created was a single function that has an array result. f(1) is interpreted as apply...

3 years ago | 0

Answered
ODE45 Multiple Degrees of Freedom Problem
% This script produces a transient response of a 3DOF dynamic model of a % jacket platform clear all clc % Define global var...

3 years ago | 0

Answered
How to solve this multi equation using matlab program
According to your y-vector, you want to have -2*p1 + 2*p2 = 0 -1*p2 + 1*p3 = 0 3/2*p1+3/2*p2-3*p3 = 0 Insert p1 = p2 = p3 ...

3 years ago | 0

Load more