Answered
How to solve PDEs with only one side boundary conditions?
Discretize du1/dt and du2/dt in time (e.g. by backward Euler method): du1/dt @t=t_i+1 = (u1^(i+1)-u1^(i))/deltat du2/dt @t=t_i...

4 years ago | 0

Answered
I will buy labtop core i5 1135G with mx350 and ram 8 gb. Is that enough to run matlab r2020b or i should buy another laptop?
https://de.mathworks.com/support/requirements/matlab-system-requirements.html These are minimum requirements. You may choose m...

4 years ago | 0

Answered
Write a MATLAB code to Find the maxima and minima of two variable function f(x,y)=x^4+y^4-4xy+1
syms x y f(x,y) f(x,y)=x^4+y^4-4*x*y+1; dfx=diff(f,x); dfy=diff(f,y); eqns=[dfx==0,dfy==0]; vars=[x y]; S=solve(eqns,vars,...

4 years ago | 1

Answered
polynomial interpolation of satelite positions
Use interp1 for the three columns separately: t = 0:60; x = interp1(T,X,t); y = interp1(T,Y,t); z = interp1(T,Z,t); where T...

4 years ago | 0

Answered
Really am I simulation this system with ODE45? How am I can optimizing the code?
function main options = odeset('RelTol',1e-6,'AbsTol',1.0e-6,'Stats','on'); tspan = (0:0.1:8.9); %========================...

4 years ago | 0

| accepted

Answered
solution of equation code of transcedental equation
function kps3 T2 = 1e-9:1e-9:1e-6; for j=1:numel(T2) t2 = T2(j); p0 = 0.5; p1 = 1; p2 = 1.5; TO...

4 years ago | 0

| accepted

Answered
Solve time-dependent ODE using the result from another time-dependent ODE
function main IC = [0;0]; S_span = [78.809 80]; opts = odeset('RelTol',1e-4,'AbsTol',1e-4); [S, y] = ode45(@fun, S_s...

4 years ago | 0

| accepted

Answered
How to solve for k
syms CR k m n solve(CR==m*n/(k*(m+n+1)),k)

4 years ago | 0

Answered
Drawing cumulative probability graph
xcoord = 1:25; ycoord = cumsum(X); figure stairs(xcoord,ycoord)

4 years ago | 0

Answered
My plot doesnt exist
result = zeros(size(H)); for i=1:numel(H) if H(i)<=1499 result(i) = (cvmin*vstall)+vdcl1; elseif H(i)>1499 &...

4 years ago | 0

Answered
How can I fix my for loop for a second order Runge Kutta Scheme?
x = zeros(1,10); x(1) = 1; t = 0:deltat:0.9; for i = 1:9 k1 = f(x(i),t(i)); k2 = f(x(i) + deltat*k1,t(i+1)); x...

4 years ago | 0

| accepted

Answered
Set fsolve tolerance for root finding
Use OutputFcn to implement your individual stopping criterion. See de.mathworks.com/help/optim/ug/output-function.html for mo...

5 years ago | 0

| accepted

Answered
summation inside for loop
vec = ones(1,5)*Q_z.' ; exp2(1:100,:) = vec ;

5 years ago | 0

Answered
Using the \ operator to fit a parabolic curve to a data set.
Replace x by x = [h.^2 h ones(length(h),1)]

5 years ago | 2

| accepted

Answered
Confusing about applying weighted least square for constant fitting
X = ones(N,1) W = diag(w) Y = y where y is the (Nx1) column vector of the measurements and w is the (Nx1) column vector of we...

5 years ago | 0

Answered
Using recursive function with combination of n variables(each variable being an array of numbers)!!
mx = size(x,2); my = size(y,2); mz = size(z,2); mr = size(r,2); ms = size(s,2); [X,Y,Z,R,S] = ndgrid(1:mx,1:my,1:mz,1:mr,1:...

5 years ago | 0

Answered
Problem in solving integration inside the for loop
Possible approaches to answer the question can be read in the discussion above.

5 years ago | 0

| accepted

Answered
Finding best parametric function estimation for ODE of first order
Search for a book on optimal control of ODEs and DAEs, e.g. Matthias Gerdts: Optimal control of ODEs and DAEs De Gruyter 2011...

5 years ago | 1

| accepted

Answered
Interpolating X axis values using a Y axis value and interp1 command.
f = @(x) (interp1(Ti,Temp,x,'pchip') - 105); x0 = 3; Ti105 = fzero(f,x0)

5 years ago | 0

Answered
How to solve set of non-linear equations using fsolve. Set of non-linear equations have equality and in-equality equations.
Use fmincon instead of fsolve. Simply set the objective function to 0 and use fmincon only to determine a feasible point of your...

5 years ago | 0

| accepted

Answered
solve a system of integral equations with matlab
If you differentiate all your equations with respect to t, you get a system of differential equations that can be solved by stan...

5 years ago | 1

| accepted

Answered
How to solve the continuity equation for dark and light scenario by symbolic function with boundary condition
The equation for P reads -V_T*mu_p*P''+ F*mu_p*P'+ r_m*P - G(x) = 0. Now you can apply the boundary conditions.

5 years ago | 0

Answered
Plotting a piecewise function for an arbitrary itration and then take intersection of them.
n=5; nx=50; x1=linspace(0,1/3,nx); x2=linspace(1/3,2/3,nx); x3=linspace(2/3,1,nx); X = [x1(1:nx-1).';x2(1:nx-1).';x3.'); Y...

5 years ago | 0

Answered
Utility of Jacobian in lsqnonlin
Stability of convergence is the main reason to supply an analytic Jacobian. For computation time, it depends on the complexity...

5 years ago | 0

| accepted

Answered
How to use isAlways to compare two symbolic equations ?
syms x isAlways(sqrt(x^2)==abs(x))

5 years ago | 0

Answered
errors in calling function
The k-values are not known in call_myequations. So you must pass them to the function: function [t,n] = call_myequations(k1,k2,...

5 years ago | 0

Answered
exclude some elements in array
last = numel(a); idx = [6:8:last,7:8:last,8:8:last]; a(idx) = [];

5 years ago | 0

| accepted

Answered
Error using horzcat Dimensions of matrices being concatenated are not consistent.
Substitute OG at the end into the equation: OGnum = 2:2:10; W = []; for i=1:numel(OGnum) AUU = subs(AU,OG,OGnum(i)); ...

5 years ago | 0

| accepted

Answered
unable to write file permission denied
After starting Matlab, type in the command window "cd" followed by a folder where you have writing permission. See http://de.m...

5 years ago | 0

| accepted

Answered
Solving ODE and using conditions
After the call to ode45, insert (without semicolon at the end of the line) expr_at_0 = n(1,1)+2*n(1,2) expr_at_end = n(end,1)+...

5 years ago | 0

| accepted

Load more