Answered
Help needed with while loop code
while RF_tot<=8 && D_var <= 30 D_var=D_var+1 RF_tot=RF_tot+RF(D_var) end Best wishes Torsten.

8 years ago | 0

| accepted

Answered
How can i use two variables with fmincon?
TL=@(X) TL_H(X(2))+TL_Y(X(1),X(2)) Best wishes Torsten.

8 years ago | 1

| accepted

Answered
Retrieving 2nd derivative after solving second order ODE via ode45
t0 = 0; tf = 5; x10 = 0; x20 = 0; [t,x] = ode45(@function1dof,[t0,tf],[x10,x20]); for i=1:numel(t) t_a...

8 years ago | 1

| accepted

Answered
PDE tool box for 1-D heat transfer
Use MATLAB's "pdepe".

8 years ago | 0

Answered
Change parameter value during ode15s solution
function dydt= fun2(t,y) ... if t<10 Pin=60; else Pin=70; end ... Better use the EVENT-facility of...

8 years ago | 0

| accepted

Answered
How to find second derivative as output of ode45?
To get the second derivative, the first derivative must be part of the solution "sol". So you have to solve 8=4*2 equations, ...

8 years ago | 3

| accepted

Answered
Can anybody help me to solve this?
p = 0.3; n = 25; nsample_binomial = 1000000; for i = 1:nsample_binomial bernoulli = (rand(1,n)<=p); binomia...

8 years ago | 0

Answered
How to solve a third order polynom?
Use MATLAB'S "roots". Best wishes Torsten.

8 years ago | 0

Answered
Runge Kutta Order 5
If you replace 4th order by 5th order Runge-Kutta, this code should work: https://de.mathworks.com/matlabcentral/fileexchang...

8 years ago | 1

Answered
fmincon function handle using matrix
myfun = @(x,L)x.'*L*x; objfun = @(x)myfun(x,L); sol = fmincon(objfun,...) with x being an (mx1) column vector. Bes...

8 years ago | 1

| accepted

Answered
Matlab ode15s change parameter value at specific time during solution
t_start = 0 und t_seg(1) = 0. In the first call to ODE15S, you consequently try to integrate from t_start=0 to t_end=0 which ...

8 years ago | 0

| accepted

Answered
How to find a constant value in an equation
Fit Y = log(1+c*x)/(c*x) using lsqcurvefit, e.g., and determine b as c/a. Best wishes Torsten.

8 years ago | 0

Answered
Loop to carry out calculation for pairs 1 and 2, then pairs 2 and 3 and so on.
Use for j = 1:length(Final_Latitude_Values)-1 instead of for j = 1:length(Final_Latitude_Values) Best wishes ...

8 years ago | 0

| accepted

Answered
How can I include constant terms in the vector f of linprog optimization?
Constant terms in the objective don't change the optimal solution vector. Thus can just set them to 0. Best wishes Torsten...

8 years ago | 0

| accepted

Answered
Ode15i problem
Remove the original equation to determine x7 and replace it with the new one: x7-x3^2+x2*(x4-x2) = 0 Best wishes Tors...

8 years ago | 0

Answered
Fit points to curve with zero slope
The polynomial is given by p = (sum_{i=1}^{n} yi) / n where (x1,y1), (x2,y2), ..., (xn,yn) are the given data ...

8 years ago | 0

| accepted

Answered
Spatial discretization has failed. Discretization supports only parabolic and elliptic equations, with flux term involving spatial derivative
You forgot to define the boundary condition of the third equation in xr. Best wishes Torsten.

8 years ago | 1

| accepted

Answered
Heat equation 1-D
Use MATLAB's "pdepe". Best wishes Torsten.

8 years ago | 0

Answered
I've just started learning matlab and I am trying to solve this differential equation
Add the line ysol(1) at the end of your code.

8 years ago | 0

| accepted

Answered
How do I solve this set of ODEs with the given boundary conditions?
http://www.wolframalpha.com/input/?i=x'(t)%3D1.2212*(x(t)-y(t)),y'(t)%3D1.7968*(y(t)-x(t)),y(0)%3D30 The conditions y(Tmax)=8...

8 years ago | 1

Answered
How do I solve a system of multivariable linear equations and inequalities?
You can use "linprog" together with an arbitrary objective function to get _one_ feasible point for your system of equalities an...

8 years ago | 0

Answered
This DAE appears to be of index greater than 1.
You try to solve dy(1)/dt = 1/A*(B*C-B*y(3))–((y(3)*D*E-F*y(2))/(1/G)+(F/((1+ (H*y(4))/(I*y(5)))*J)) dy(2)/dt = 1/A*...

8 years ago | 1

| accepted

Answered
quadgk errors: Supported classes are 'double' and 'single'
kB=1.38e-23; Eg=2.18.*(1.6e-19); T=300; TkB =4.14e-21; hbar=1.055e-34; me=9.11e-31; mestar=0.21.*me; N=...

8 years ago | 0

| accepted

Answered
Solving 2nd order linear ode - wave equation - the solution at final values overshoots diverging from theoretical solution
Numerical problem. If you choose the product "2*pi*freq*mu_0*sigma_bulk" to be one power of ten less (e.g freq = 15e8 instead...

8 years ago | 0

Answered
Errors in objective function
function main xdata=1:30; ydata=[0,0,0,37248,58649,85974,132620,200698,266406,325423,383975,443234,498503,558777,612881,...

8 years ago | 0

| accepted

Answered
All zeros result when concatenating a complex vector with its conjugate
aux_P = P; frameSize=2048; P = zeros(15251,frameSize); P = [aux_P, flip(conj(aux_P),2)]; works for me.

8 years ago | 1

| accepted

Answered
Need Help to Plot confidence Interval For the following Code
https://de.mathworks.com/help/curvefit/confint.html

8 years ago | 0

| accepted

Answered
Having problems with ode solution
Use [t,y] = ode15s(@(t,y)Mechanism(t,y,E,K,k), tspan, S, options); instead of [t,y] = ode15s(@(t,y)Mechanism(t,S,E,...

8 years ago | 1

| accepted

Answered
How can I delete the imaginary part of an array?
C(C~=real(C)) = NaN;

8 years ago | 1

Answered
How do I plot heat transfer coefficient (h) against values not used in the equation?
Pr = 7.02; Re = 5000:20000; Nu = 0.9553*Pr^0.4*Re.^0.5; D = 0.897e-3; k = 0.6; h = Nu*k/D; plot(Re,h)

8 years ago | 0

| accepted

Load more