Community Profile

photo

Torsten


Last seen: 3 meses ago Active since 2013

Statistics

  • 36 Month Streak
  • Ace
  • Revival Level 2
  • Knowledgeable Level 4
  • First Answer

View badges

Content Feed

View by

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

3 meses ago | 0

| accepted

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

3 meses 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)]

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

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

3 meses ago | 0

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

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

3 meses 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)

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

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

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

3 meses 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 meses 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 meses ago | 0

| accepted

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

5 meses 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 meses ago | 0

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

5 meses 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 meses 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 meses ago | 0

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 meses ago | 0

| accepted

Answered
Error in ode45
[t,n] = ode45(@(t,n)ODE(t,n,k1,k2,...),[0 1e-3],IC); Better to write an array for k with 155 entries (k(1),k(2),...) than to d...

5 meses ago | 1

| accepted

Answered
ODE 45 to solve coupled ODE
To be honest, I'd prefer to know what Matlab solves. Order the variables as [z1,z2,z3,z4,z5,z6] = [y1,y2,y3,y1',y2',y3'] Then...

5 meses ago | 0

Answered
NUMERICAL METHODS DISCRETISATION PROBLEM
Solve -Δv = -5/4*π^2*sin(π*x)*cos(π*y/2) by just modifying the b-vector from exercise part a). Let the solution be v. Then a...

5 meses ago | 0

Answered
How to set up a function
Differentiating your equation with respect to t gives the differential equation V'(t) = Qdot/(m*R_s*T) * V(t) with solution V...

5 meses ago | 0

Answered
Using the improved Euler (Huen) method, determine the approximate solution y (t) of the following starting problem:
Untested ! function main H = [1/2 ,1/4,1/8,1/16,1/32]; t0 = 0; t1 = 0.5; y0 = 1; f = @(t,y) y*exp(5*t); for i= 1:numel(...

5 meses ago | 0

Answered
How to use ode45 in this case?
ydot = y'(t0) + cumtrapz(t,-tan(phi).*(zdd+gravity)); y = y(t0) + cumtrapz(t,ydot), plot(t,y) where t is your (1xn) vector of...

5 meses ago | 1

| accepted

Answered
Objective function with summation
Choose u_0,...,u_N as unknowns. In the objective function, calculate x_1,...x_(N+1) from A and u_0,...u_N. Return u_0^2 + ... ...

5 meses ago | 0

| accepted

Answered
System of 2nd order ODE with Euler.
y0 must be a 4x1 vector, not a scalar. ye = zeros(4,n) instead of ye=zeros(1,n) ye(:,1) = y0 instead of ye(1) = y0 ye(:,i+1) ...

5 meses ago | 1

Answered
lsqcurvefit to estimate parameters in ODE15s
function C = kinetics(theta,t) instead of function [C,T] = kinetics(theta,t) Define stronger RelTol and AbsTol for ODE15S and...

5 meses ago | 0

Answered
How to plot a deviation (upper/lower limit)
Include 1.05*signal and 0.95*signal in the same plot.

5 meses ago | 1

Answered
How to calculate the area under curve?
area_under_curve= trapz(x,y)

5 meses ago | 1

| accepted

Load more