Answered

How can I solve coupled nonlinear hyperbolic equations?

CLAWPACK available under https://www.clawpack.org/ is an excellent solver for hyperbolic systems of differential equations. A...

How can I solve coupled nonlinear hyperbolic equations?

CLAWPACK available under https://www.clawpack.org/ is an excellent solver for hyperbolic systems of differential equations. A...

4 dagen ago | 0

Answered

How to add integral in a integral function

format long integral(@(x)sin(integral(@(a)sin(a),0,x)),0,1,'ArrayValued',true) integral(@(x)sin(1-cos(x)),0,1)

How to add integral in a integral function

format long integral(@(x)sin(integral(@(a)sin(a),0,x)),0,1,'ArrayValued',true) integral(@(x)sin(1-cos(x)),0,1)

4 dagen ago | 0

| accepted

Answered

why while loop repeats so long?

If you output "count" for the numerical solution, it's about 14000. Now if you measure the time for one symbolic iteration in ...

why while loop repeats so long?

If you output "count" for the numerical solution, it's about 14000. Now if you measure the time for one symbolic iteration in ...

4 dagen ago | 0

| accepted

Answered

vector and for-loop issues in ode solver

%Parameters input.n=10; % # in r input.Ea=63000; % [J/mol] input.R=8.314; % [J/mol/K] input...

vector and for-loop issues in ode solver

%Parameters input.n=10; % # in r input.Ea=63000; % [J/mol] input.R=8.314; % [J/mol/K] input...

4 dagen ago | 0

| accepted

Answered

Basis function regression for 3 parameters

Put the equations y(x1(i),x2(j),x3(k)) = a_0*f_0(x1(i), x2(j), x3(k)) + a_1*f_1(x1(i), x2(j), x3(k)) + a_2*f_2(x1(i), x2(j), x3...

Basis function regression for 3 parameters

Put the equations y(x1(i),x2(j),x3(k)) = a_0*f_0(x1(i), x2(j), x3(k)) + a_1*f_1(x1(i), x2(j), x3(k)) + a_2*f_2(x1(i), x2(j), x3...

4 dagen ago | 0

Answered

Eigenvalues in symbolic matrix

Replace %% 2.stability analysis J=jacobian([gp(1)*vp(1)./(kp(1)+N0)*N*P1 - mp(1)*P1^2==0, ... gp(2)*vp(2)./(kp(2)...

Eigenvalues in symbolic matrix

Replace %% 2.stability analysis J=jacobian([gp(1)*vp(1)./(kp(1)+N0)*N*P1 - mp(1)*P1^2==0, ... gp(2)*vp(2)./(kp(2)...

4 dagen ago | 0

| accepted

Answered

sum of Bessel function

m = 0:250; x = linspace(-5*pi,5*pi,1000).'; A = 2./((2*m+1)*pi).*besselj(0,pi/2*m).*sin(1000*(2*m+1).*x-(2*m+1)*pi/2); f = su...

sum of Bessel function

m = 0:250; x = linspace(-5*pi,5*pi,1000).'; A = 2./((2*m+1)*pi).*besselj(0,pi/2*m).*sin(1000*(2*m+1).*x-(2*m+1)*pi/2); f = su...

4 dagen ago | 0

Answered

Finite difference temperature distribution with TDMA

You solve the system iteratively. But you were told to solve it with the Thomas-Algorithm. So apply this algorithm to the matrix...

Finite difference temperature distribution with TDMA

You solve the system iteratively. But you were told to solve it with the Thomas-Algorithm. So apply this algorithm to the matrix...

4 dagen ago | 0

| accepted

Answered

How to solve a system of 8 equations having integrals!

d0 = ones(1,8); d = fsolve(@fun,d0) norm(fun(d)) function res = fun(D) d=1.18; E=27000000; L=121.53; I=(pi*d^4)...

How to solve a system of 8 equations having integrals!

d0 = ones(1,8); d = fsolve(@fun,d0) norm(fun(d)) function res = fun(D) d=1.18; E=27000000; L=121.53; I=(pi*d^4)...

5 dagen ago | 1

| accepted

Answered

In fmincon I set the linear constraint x1+x2+x3=12, but the sum of decision variables in the iteration result does not meet the condition

Tighten your ConstraintTolerance, and you'll see that fmincon converges to an infeasible point for n=12 and n=13. 1st： (main.m)...

In fmincon I set the linear constraint x1+x2+x3=12, but the sum of decision variables in the iteration result does not meet the condition

Tighten your ConstraintTolerance, and you'll see that fmincon converges to an infeasible point for n=12 and n=13. 1st： (main.m)...

5 dagen ago | 2

| accepted

Answered

unable to plot RungeKutta trajectory graph, potentially initial conditions?

Your code produces NaN values for z(1,:) and z(3,:), most probably caused by thetad and thetav. alpha = pi/4; tend = 2; v0 = ...

unable to plot RungeKutta trajectory graph, potentially initial conditions?

Your code produces NaN values for z(1,:) and z(3,:), most probably caused by thetad and thetav. alpha = pi/4; tend = 2; v0 = ...

5 dagen ago | 0

Answered

bvp4c/bvp5c error

Did you create a function with name "eps" ? Then you should rename it because "eps" is an internal MATLAB function.

bvp4c/bvp5c error

Did you create a function with name "eps" ? Then you should rename it because "eps" is an internal MATLAB function.

5 dagen ago | 0

| accepted

Answered

How to solve f'(x)=0?

You want to find x symbolically or numerically ? Numerically use "fzero". Symbolically use "solve".

How to solve f'(x)=0?

You want to find x symbolically or numerically ? Numerically use "fzero". Symbolically use "solve".

5 dagen ago | 0

Answered

Trying to find area under my plot

https://de.mathworks.com/matlabcentral/answers/514107-how-to-find-area-enclosed-by-a-closed-curve To get the positive and negat...

Trying to find area under my plot

https://de.mathworks.com/matlabcentral/answers/514107-how-to-find-area-enclosed-by-a-closed-curve To get the positive and negat...

6 dagen ago | 0

Answered

I want to use a matrix and a function to then create another function

theta1 = -50; theta2 = 30; theta3 = 15; theta4 = -75; theta5 = -45; theta6 = -60; DH = [theta1, 486.5, 150, -90;... ...

I want to use a matrix and a function to then create another function

theta1 = -50; theta2 = 30; theta3 = 15; theta4 = -75; theta5 = -45; theta6 = -60; DH = [theta1, 486.5, 150, -90;... ...

6 dagen ago | 0

Answered

Solving system of 9 nonlinear equaitons in 16 variables

x0 = -10*ones(16,1); AB = [13 15 -1;9 24 0;7 2 35]; options = optimset('TolFun',1e-16,'TolX',1e-16); x = fmincon(@(x)fun(x,AB...

Solving system of 9 nonlinear equaitons in 16 variables

x0 = -10*ones(16,1); AB = [13 15 -1;9 24 0;7 2 35]; options = optimset('TolFun',1e-16,'TolX',1e-16); x = fmincon(@(x)fun(x,AB...

6 dagen ago | 2

| accepted

Answered

the same value resulted from the linear optimization problem

You define w(k)=beta(k)*(-k_(k) *w_k(k)-k_(k)*log2(lamda(k)*(1-tau^2))*Pt + 2*k_(k)*log2(sqrt(segma_squared))-v_k(k)); and w...

the same value resulted from the linear optimization problem

You define w(k)=beta(k)*(-k_(k) *w_k(k)-k_(k)*log2(lamda(k)*(1-tau^2))*Pt + 2*k_(k)*log2(sqrt(segma_squared))-v_k(k)); and w...

6 dagen ago | 0

Answered

Hello guys, I need to solve this system of nonlinear symbolic equation; the variables known are X,Y,Z and I already know the solution for q1; so I just need to find q2 and q3.

syms d1 d5 a2 a3 a4 q1 q2 q3 X Y Z % Square eq1 and eq2, add both sides of the equations and take sqrt % Check for other solu...

Hello guys, I need to solve this system of nonlinear symbolic equation; the variables known are X,Y,Z and I already know the solution for q1; so I just need to find q2 and q3.

syms d1 d5 a2 a3 a4 q1 q2 q3 X Y Z % Square eq1 and eq2, add both sides of the equations and take sqrt % Check for other solu...

6 dagen ago | 0

| accepted

Answered

What's the simplest way to determine the mass of a sphere from a plot of its density varying in r?

If r and rho are column vectors where r is ordered as r(1) < r(2) < ... < r(n) and rho is the density at position r, an approxim...

What's the simplest way to determine the mass of a sphere from a plot of its density varying in r?

If r and rho are column vectors where r is ordered as r(1) < r(2) < ... < r(n) and rho is the density at position r, an approxim...

6 dagen ago | 2

| accepted

Answered

Index exceeds the number of array elements. Index must not exceed 1.

Pb is a scalar. So Pb(ii) does not exist. You can use Fbump(ii)=Pb/VA(ii); %this line of code is givig me the error but I don...

Index exceeds the number of array elements. Index must not exceed 1.

Pb is a scalar. So Pb(ii) does not exist. You can use Fbump(ii)=Pb/VA(ii); %this line of code is givig me the error but I don...

6 dagen ago | 0

Answered

Erro in calling function using horner()

I don't understand what you intend by using the lines [pz,b] = horner(a,x); [dpz,b]= horner(b,x); [pz ,a] = horner(a,x) The...

Erro in calling function using horner()

I don't understand what you intend by using the lines [pz,b] = horner(a,x); [dpz,b]= horner(b,x); [pz ,a] = horner(a,x) The...

6 dagen ago | 0

| accepted

Answered

Solving an integral when the parameters is a matrix - Controllability Gramian

You mean syms t t0 tf A = [0 1 0 0;0 0 -4.91 0;0 0 0 1;0 0 73.55 0]; B = [0;2;0;-10]; [M,J] = jordan(A); phi_s=M * expm(J...

Solving an integral when the parameters is a matrix - Controllability Gramian

You mean syms t t0 tf A = [0 1 0 0;0 0 -4.91 0;0 0 0 1;0 0 73.55 0]; B = [0;2;0;-10]; [M,J] = jordan(A); phi_s=M * expm(J...

6 dagen ago | 0

| accepted

Answered

sum of Bessel function

syms x syms m integer A = 2/((2*m+1)*pi)*besselj(0,pi/2*m)*sin((2*m+1)*1000*x-(2*m+1)*pi/2) g = symsum(A,m,0,Inf) fplot(g...

sum of Bessel function

syms x syms m integer A = 2/((2*m+1)*pi)*besselj(0,pi/2*m)*sin((2*m+1)*1000*x-(2*m+1)*pi/2) g = symsum(A,m,0,Inf) fplot(g...

6 dagen ago | 0

Answered

Solving Laplace equation using Finite difference

If L = 3 and H = 1, you cannot choose the same number of points in x and y direction if you update U as if you use a grid with e...

Solving Laplace equation using Finite difference

If L = 3 and H = 1, you cannot choose the same number of points in x and y direction if you update U as if you use a grid with e...

6 dagen ago | 0

| accepted

Answered

solve matrix differential equations with ode45

syms t y1(t) y2(t) A = [0 1;8 -2]; Y = dsolve(diff([y1;y2],t)==A*[y1;y2]) y1 = Y.y1; y2 = Y.y2; diff(y1,t)-y2 diff(y2,t)-8...

solve matrix differential equations with ode45

syms t y1(t) y2(t) A = [0 1;8 -2]; Y = dsolve(diff([y1;y2],t)==A*[y1;y2]) y1 = Y.y1; y2 = Y.y2; diff(y1,t)-y2 diff(y2,t)-8...

7 dagen ago | 0

Answered

How do I use meshgrid and quiver3 in a system of differential equations?

https://web.sha1.bfh.science/Labs/F2/ODE/VectorFields.pdf

How do I use meshgrid and quiver3 in a system of differential equations?

https://web.sha1.bfh.science/Labs/F2/ODE/VectorFields.pdf

7 dagen ago | 0

Answered

How can I solve this matrix question using for loop?

Not the most efficient solution, but maybe best to understand what's happening. A=[0 0 0 ;6 5 7;12 14 30;35 40 42;75 55 50;85 6...

How can I solve this matrix question using for loop?

Not the most efficient solution, but maybe best to understand what's happening. A=[0 0 0 ;6 5 7;12 14 30;35 40 42;75 55 50;85 6...

7 dagen ago | 0

| accepted

Answered

myfunction not working when applied on a meshgrid

x= 0:0.01:2*pi; %629 element. y= 0:0.001:1; %1001 element. [X, Y]= meshgrid(x,y); z=zeros(1001,629); %% for X and Y are bot...

myfunction not working when applied on a meshgrid

x= 0:0.01:2*pi; %629 element. y= 0:0.001:1; %1001 element. [X, Y]= meshgrid(x,y); z=zeros(1001,629); %% for X and Y are bot...

7 dagen ago | 1

| accepted

Answered

How to find the actual value of d,b,t and D in the maximum value of sac?

close all clear all clc % Constants c = 340; % Speed of sound rho = 1.204; % ...

How to find the actual value of d,b,t and D in the maximum value of sac?

close all clear all clc % Constants c = 340; % Speed of sound rho = 1.204; % ...

7 dagen ago | 0

Answered

Need to solve this with Runge-Kutta 4th order method in MatLab.

fy=@(x,y,z) z; fz=@(x,y,z) (1-y^2)*z-y; x(1)=0; z(1)=0; y(1)=1; h=0.1; xfinal=10; N=ceil((xfinal-x(1))/h); for j=1:N ...

Need to solve this with Runge-Kutta 4th order method in MatLab.

fy=@(x,y,z) z; fz=@(x,y,z) (1-y^2)*z-y; x(1)=0; z(1)=0; y(1)=1; h=0.1; xfinal=10; N=ceil((xfinal-x(1))/h); for j=1:N ...

7 dagen ago | 0

| accepted