Answered
How to solve ODE for varying input using ode23 ?
% function function vdot = diff3(t,v) u = [1 2 3 4 5] ; tu = [1 2 3 4 5]; u_at_t = interp1(tu,u,t); vdot(1) = ...

10 years ago | 1

| accepted

Answered
solving 1D heat equation with constant heat flux (boundary condition)
What is the boundary condition you are trying to implement ? lambda*dT/dn = alpha*(T-T_ext) (n: outer normal) ? Best wishe...

10 years ago | 0

| accepted

Answered
Solving a differential equation for multiple constants
Take a look at Star Strider's answer under https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitt...

10 years ago | 0

Answered
How to plot a value as function of two variables
Choose the one you like: http://de.mathworks.com/help/matlab/visualize/representing-a-matrix-as-a-surface.html Best wishes...

10 years ago | 0

Answered
I have a multi variable equation (four variables). I want to write a piece of code that solves for any one variable given the other three, without changing the equation every time. Is that possible?
syms A B C D eqn=A-B*C^2*D^2==0; solA=solve(eqn,A); solB=solve(eqn,B); solC=solve(eqn,C); solD=solve(eqn,D); ...

10 years ago | 0

| accepted

Answered
Does lsqlin give different solution if the rows of C matrix and d matrix are changed accordingly?
I don't understand your notation, but here is an example: If C1=[1 6 4 8]; d1=[4 7]; C2=[9 2 ...

10 years ago | 1

| accepted

Answered
Solving an ODE numerically .. What is the problem in my code?
Use fplh_Rh_Nh instead of fplh*Rh*Nh: fplh_Rh_Nh = 4.56e3; ... dqpldt=fplc*Rc*Nc0*exp(Kgr*t)+fplh_Rh_Nh0-Kel*qpl B...

10 years ago | 0

| accepted

Answered
Maximization of a Non-differentiable with constraints
http://de.mathworks.com/help/optim/ug/fminimax.html together with https://de.mathworks.com/matlabcentral/answers/91597-is-...

10 years ago | 0

Answered
why its not work
n1=5; x=50:5:200; y=2*pi*n1./x; plot (x,y); Best wishes Torsten.

10 years ago | 1

| accepted

Answered
Picking value from CDF
v_68 = interp1(probability,velocity,0.68); v_95 = interp1(probability,velocity,0.95); v_99_7 = interp1(probability,veloc...

10 years ago | 0

| accepted

Answered
How can I construct a optimization problem with MATLAB
If you have licenced the optimization toolbox, try "lsqcurvefit". Best wishes Torsten.

10 years ago | 0

Answered
Finding slope and y intercept
Did you look at the x-value where your "intercept" is between 0.32 and 0.33 ? Best wishes Torsten.

10 years ago | 1

Answered
Double Integral for Discrete Function
Take a look at the example "Multiple Numerical Integrations" under http://de.mathworks.com/help/matlab/ref/trapz.html Best...

10 years ago | 2

| accepted

Answered
How to carry out nested integration functions is Matlab?
Maybe it works if you write the inner integral in terms of its analytical solution http://integrals.wolfram.com/index.jsp?exp...

10 years ago | 0

Answered
Bug in normpdf function
The height of the peaks depends on how small min(I-mu) is. Choosing D->Inf (e.g. D=10000), the shape of the pulses should become...

10 years ago | 0

| accepted

Answered
Can I have the user input a non linear equation?
http://de.mathworks.com/help/matlab/ref/str2func.html should help. Best wishes Torsten.

10 years ago | 0

Answered
If standard error of a is known and standard error of b is known how to find out standard error of a/b
Take a look at the answer by "BGM" under http://www.talkstats.com/showthread.php/16499-Standard-deviation-of-the-Ratio-of-two...

10 years ago | 0

Answered
how do i find the roots of this function? the function is attached
Plot the function and use "fzero" to determine the roots with appropriate starting intervals taken from your graphical inspectio...

10 years ago | 0

Answered
Solving a system of equation with two different series.
beta=...; a1=...; a2=...; h(1) = 0.026; for i=2:36 h(i)=1-sum(h(1:i-1))-(beta*exp(-a1*i)*(a1*i+1)+(1-beta)*ex...

10 years ago | 0

Answered
Trying to combine For and If loop
#Want to do 10 loops of n #If n is even /2 #if n is odd n*3 +1 n = input("enter first value for n") for i = 1:...

10 years ago | 1

| accepted

Answered
Updating variables within ODE function
ode45 can also solve for algebraic variables like k0g,w0g and V0g. So instead of iterating with fsolve, add the algebraic equati...

10 years ago | 0

Answered
How to I compute partial derivatives of a function
Compute the derivatives symbolically using "diff" and turn the result in a function handle using "matlabFunction". Best wishe...

10 years ago | 0

Answered
How to optimize k*x <= epsilon?
Please state your problem more clearly. k is a scalar and epsilon is a matrix with all elements equal to Epsilon, and you wan...

10 years ago | 1

| accepted

Answered
Loop possible? [Blasius Equation with fsolve]
I did not check your equations, but already your call to fsolve is incorrect: anfangswert=horzcat(zeros(1,1:N),ones(1,1:N),...

10 years ago | 0

| accepted

Answered
how to create a matrix in sigle command?
One single command: c = [0 0 0 0 0;0 0 1 2 3;0 0 4 5 6;0 0 7 8 9]; Best wishes Torsten.

10 years ago | 1

Answered
How to define an ODE when there are some parameters are function of dependent variable?
d/dx[D*dy/dx] = dD/dy*(dy/dx)^2 + D*d^2y/dx^2, thus you have to solve the system y1'=y2 y2'=(R(y1)-dD(y1)/dy1*(y2)^...

10 years ago | 0

| accepted

Answered
How to solve a system of one differential equation with two algebraic equations using boundary (not initial ) conditions
The equations f(x)+a4*f(x)*g(x)+a5*g(x)+a6*g(x)*y(x)+a7*y(x)=0 g(x)+a8*g(x)*y(x)+a9*y(x)=0 can explicitly be solved f...

10 years ago | 0

Answered
2 Degree of Freedom system with ODE 45
Try function [Xdot] =EOM(tspan,X,k1,k2,k3,c1,c2,c3,m1,m2,F0,w) Xdot =zeros(4,1); x1=X(1); x1dot=X(2); ...

10 years ago | 1

| accepted

Answered
Solve for two 1024x1024 variables using two equations.
Your equations are linear in log(A). So first solve (taking paper and pencil) for log(A) as an expression depending on B. Then i...

10 years ago | 1

Answered
minimize||(R+S'QS)K + S'QT||
Maybe "quadprog", maybe "fmincon". See which solver best fits your needs. Best wishes Torsten.

10 years ago | 0

Load more