Answered

Error using fzero function

I changed v = -4*hp.*A(h)./pi*d^2; %vitesse dans le tuyau to v = -4*hp.*A(h)./(pi*d^2); %vitesse dans le tuyau For bett...

Error using fzero function

I changed v = -4*hp.*A(h)./pi*d^2; %vitesse dans le tuyau to v = -4*hp.*A(h)./(pi*d^2); %vitesse dans le tuyau For bett...

6 Tage ago | 0

Answered

Hi guys this question is on linear programming and i am trying to figure out how to define inequalities with unknown variables.

help linprog and https://de.mathworks.com/matlabcentral/fileexchange/24816-plot_feasible-m

Hi guys this question is on linear programming and i am trying to figure out how to define inequalities with unknown variables.

help linprog and https://de.mathworks.com/matlabcentral/fileexchange/24816-plot_feasible-m

6 Tage ago | 0

Answered

Optimal control problem with integral cost function and both initial and terminal conditions

I think this part % convert symbolic objects to strings for using ’dsolve’ eq1 = strcat('Dx1=',char(Dx1)); %concatena le strin...

Optimal control problem with integral cost function and both initial and terminal conditions

I think this part % convert symbolic objects to strings for using ’dsolve’ eq1 = strcat('Dx1=',char(Dx1)); %concatena le strin...

7 Tage ago | 0

Answered

Find row with unequal distance

idx = find(diff(diff(A)) > 0,1,'first'); A(idx+2)

Find row with unequal distance

idx = find(diff(diff(A)) > 0,1,'first'); A(idx+2)

7 Tage ago | 0

Answered

Looking for method to simplify equation within MATLAB

syms a b c d X = 2*a+3*b+7*c+d; X = subs(X,d,2*a+4*b)

Looking for method to simplify equation within MATLAB

syms a b c d X = 2*a+3*b+7*c+d; X = subs(X,d,2*a+4*b)

7 Tage ago | 0

| accepted

Answered

ı want to solve this question by excel formulas?

Without guarantee: disbursement = (5000*1.04^23 + 2000*1.04^4*(1.04^19-1)/0.04)/((1.04^4-1)/0.04) thus approximately 18150 $.

ı want to solve this question by excel formulas?

Without guarantee: disbursement = (5000*1.04^23 + 2000*1.04^4*(1.04^19-1)/0.04)/((1.04^4-1)/0.04) thus approximately 18150 $.

7 Tage ago | 1

Answered

Choosing balls from the boxes

positions_red = 1:4; positions_blue = 5:8; positions_green = 9:12; position_black = 13; Ntrials = 1e5; succ...

Choosing balls from the boxes

positions_red = 1:4; positions_blue = 5:8; positions_green = 9:12; position_black = 13; Ntrials = 1e5; succ...

7 Tage ago | 1

| accepted

Answered

Find zero crossings in each row of a matrix (321 x 123 double)

https://de.mathworks.com/matlabcentral/answers/375849-finding-zero-crossings-in-a-signal

Find zero crossings in each row of a matrix (321 x 123 double)

https://de.mathworks.com/matlabcentral/answers/375849-finding-zero-crossings-in-a-signal

7 Tage ago | 0

Answered

How to plot this equation?

fun = @(t,y) 2*y./t - t.^2.*y.^2; t = 0.1:0.1:3; y = 0:0.1:3; [T,Y] = meshgrid(t,y); surf(T,Y,fun(T,Y))

How to plot this equation?

fun = @(t,y) 2*y./t - t.^2.*y.^2; t = 0.1:0.1:3; y = 0:0.1:3; [T,Y] = meshgrid(t,y); surf(T,Y,fun(T,Y))

7 Tage ago | 0

Answered

after generating a 4 by 4 random matrix of X on matlab. How do i change X so that all its elements are in the range of 10 to 50

X = 10 + rand(4,4)*(50-10)

after generating a 4 by 4 random matrix of X on matlab. How do i change X so that all its elements are in the range of 10 to 50

X = 10 + rand(4,4)*(50-10)

8 Tage ago | 0

| accepted

Answered

How to plot this equation if C is 4?

fun = @(t,C) 5*t.^2./(t.^5+C); t = 0:0.01:3; C = 4; plot(t,fun(t,C))

How to plot this equation if C is 4?

fun = @(t,C) 5*t.^2./(t.^5+C); t = 0:0.01:3; C = 4; plot(t,fun(t,C))

8 Tage ago | 0

| accepted

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

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

8 Tage 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...

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

8 Tage 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...

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

8 Tage 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:...

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

8 Tage 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...

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

8 Tage 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)

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)

8 Tage ago | 0

Answered

What are some Taylor series commands?

https://de.mathworks.com/help/symbolic/sym.taylor.html

What are some Taylor series commands?

https://de.mathworks.com/help/symbolic/sym.taylor.html

8 Tage 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 = ...

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

8 Tage 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...

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

9 Tage 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...

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

9 Tage 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))

how to plot solution of ODE eqution with out using fplot ?

Vsol = matlabFunction(VSol); t = 0:0.001:5; plot(t,Vsol(t))

9 Tage 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 ...

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

9 Tage 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....

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

9 Tage ago | 0

Answered

three curve at different x values

plot(x(x<=41.1),blue_curve(x<=41.1))

three curve at different x values

plot(x(x<=41.1),blue_curve(x<=41.1))

9 Tage 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...

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

10 Tage 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...

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

10 Tage 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 ?

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 ?

11 Tage 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(...

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

11 Tage 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...

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

11 Tage ago | 0

| accepted