Answered
multiple derivative of parametric expression
its 11 derivative ? What do you mean ? In any case - use "diff": https://de.mathworks.com/help/symbolic/diff.html Best ...

9 years ago | 0

Answered
How can I optimize the value of 3 parameters simultaneously to get the simulation daily output almost equal to the measured daily output?
Take a look at the examples provided under https://de.mathworks.com/help/optim/ug/lsqcurvefit.html Best wishes Torsten....

9 years ago | 0

Answered
Unable to perform numerical integration when matrices are involved.
Try whether this code works for you: function main qty = quadgk(@fun4,0,inf) function y=fun4(gamma1vec) <<Pu...

9 years ago | 1

| accepted

Answered
bounding ODEs to have ZERO values whenever being negative
https://de.mathworks.com/help/matlab/math/nonnegative-ode-solution.html Best wishes Torsten.

9 years ago | 1

Answered
Solving a system of PDEs?
If all equations are of this form, use "pdepe". Best wishes Torsten.

9 years ago | 0

| accepted

Answered
function in for loop
R=zeros(1,length(Numbers_used_P4)) for i=1:length(Numbers_used_P4) R(i) = CentreCircle(M,NumbersP4,x,y,d,i,P4_x,P4_y,x...

9 years ago | 1

Answered
how to use fminunc with summation?
fun4 = @(x) (norm(x-1))^2 Best wishes Torsten.

9 years ago | 0

Answered
Unable to use quadgk for integration
In fun0 and fun4, replace all "*" , "/" and "^" by ".*", "./" and ".^" . Best wishes Torsten.

9 years ago | 0

Answered
PDEPE: Spatial Discretization has failed
"pdepe" expects boundary conditions for all solution variables in both boundary points. Since the equation for q is a simple ODE...

9 years ago | 0

| accepted

Answered
Hello guys! I've got an issue with a matrix, it says Matrix is singular to working precision.
Rows 10 and 11 are linearly dependent - so A1^(-1) does not exist. Best wishes Torsten.

9 years ago | 0

Answered
3D diffusion equation in cylinder
If you have experience with the discretization of partial differential equations, you can write your own MATLAB code. Otherw...

9 years ago | 0

Answered
How to get answers in implicit forml?
Use "fzero" to solve psi-(U*y+m*atan2(y,x+a)-m*atan2(y,x-a))=0 for y. Best wishes Torsten.

9 years ago | 1

| accepted

Answered
How to convert a matrix/vector of symbolic variable into an anonymous function (matlabFunction) ?
I wonder why you don't just define Vec_func = @(x,y)[1/x, x/(x^2 + y^2), y/x]; Matrix_func = @(x,y) [1/x,x/(x^2 + y^2),y...

9 years ago | 0

Answered
How to integrate integrate by using loop
Use MATLAB's "dsolve". Best wishes Torsten.

9 years ago | 0

Answered
How do I fit a "Normal" distribution curve to this data set?
https://de.mathworks.com/help/stats/mle.html Best wishes Torsten.

9 years ago | 0

Answered
Matlab ODE45 with parameters which depend on the solution
If you want to reset a parameter after each successful time step taken by the solver, you can use the "OutputFcn" routine (see t...

9 years ago | 1

Answered
How to make an infinite sequence in matlab
N=50; x=-100:1:100; y=zeros(numel(x),1) y(abs(x)<N)=1; Best wishes Torsten.

9 years ago | 0

Answered
Overlap integral of the electric field distribution
xc = linspace(0,1,M); yc = linspace(0,1,M); A = E1 .* E2; B = (trapz(xc,trapz(yc, abs(A), 1)) ).^2; C = trapz(xc,t...

9 years ago | 1

| accepted

Answered
How can i solve "Subscript indices must either be real positive integers or logicals." error.
s=Ac*(1+k*ym).*cos(2*pi*fc*t); Best wishes Torsten.

9 years ago | 0

| accepted

Answered
What does x=val(1,:)?
"x" is set to the first row of "val" (thus "x" is a vector of size 1xN where N is the number of columns of "val") Best wishes...

9 years ago | 1

| accepted

Answered
I would like to solve a 2x2 system of equations. Can anyone help me please?
syms theta t eqns=[ (t-0.1)*sqrt(1-(121-(t-0.1)^2*400*theta)==(8.66*t-10)/(20*theta) , theta == sqrt(1-(8.66*t-4.9...

9 years ago | 0

Answered
I would like to solve a 2x2 system of equations. Can anyone help me please?
Did you try MATLAB's "solve": https://de.mathworks.com/help/symbolic/solve.html ? Best wishes Torsten.

9 years ago | 0

| accepted

Answered
a function including a constraint condition
if g(x) <= 0 fval = f(x); end % evaluate f only if g(x) <=0. Best wishes Torsten.

9 years ago | 0

Answered
Convert higher order to first order system
You will have to define f=@(t,y) [y(2) y(3) y(4) 2*y(2)-y(3)+2*y(4)]; Additionally note that "rk4_high_ode" must be mod...

9 years ago | 0

Answered
How can i fix 'Unable to solve the collocation equations -- a singular jacobian encountered' problem?
You can't prescribe f(0)=1 and f(0)=0 at the same time as boundary condition. Best wishes Torsten.

9 years ago | 0

| accepted

Answered
Lsqcurvefit - multiple parameters - two variables
p0 = [3,1,2,10] ; xdata = zeros(numel(x)*numel(y),1); ydata = reshape(Sigma_data,[numel(x)*numel(y),1]); p_sol = lsqc...

9 years ago | 0

| accepted

Answered
for | Error: Expression or statement is incomplete or incorrect.
Rm = [0:10]; Xm = [5 7 9]; Zm = [10 5 7]; for i=1:11 for j=1:3 dist(i,j) = sqrt((Rm(i)-Xm(j))^2+Zm(j)^2)...

9 years ago | 1

| accepted

Answered
Plot piecewise function on an interval
function y=f(t) y = zeros(size(t)); % Preallocating enough memory for y tmod=mod(t,4)-2; region1 = (tmod...

9 years ago | 0

| accepted

Answered
Make an implicit function in matlab?
Use "fminbnd" to search for the minimum of the function f=@(x)-(x*h*sqrt(4a*h+(1-x)*a*h)+(1-x*h)*sqrt((1-x)*2*h)) in the ...

9 years ago | 1

Load more