Answered
How to Solve system of nonlinear PDE
Looks better, doesn't it ? Tin = 445; % Feed concentration L = 17; % Reactor length ...

4 years ago | 0

| accepted

Answered
How to plot a set as the constraint in 2D?
syms x y f = sqrt(x^2+y^2); ezplot(f, [0 10 0 10])

4 years ago | 0

Answered
Store function results from for loop
i = 0; for do_shaft = .04:.001:.14 for h = .01:.001:.10 for w = .01:.001:.10 Nf = func(inputs) ...

4 years ago | 0

| accepted

Answered
Finding global minimum with rand
fumin = Inf; for i = 1:100000 u = -6 + 12*rand(3,1); fu = f(u); if fu < fumin umin = u; fumin = fu; end...

4 years ago | 0

| accepted

Answered
Check if function handle is nonlinear with Matlab
Call your function handle f with symbolic vectors x and y and a symbolic scalar a and check whether f(x+y) - (f(x) + f(y)) - f(...

4 years ago | 1

| accepted

Answered
Solving a nonlinear system differential equation using symbols
Here is the sequence of commands to obtain the solution in Octave. One can use the "solve" directly for all variables, but I de...

4 years ago | 0

Answered
estimation of parameters by using lsqnonlin for system of differential equations
[B,resnorm,RESIDUAL,exitflag,OUTPUT,LAMBDA,Jacobian] = lsqnonlin(@Kinetics,B0,time,A_data,lb,ub,options ); This is not the corr...

4 years ago | 1

Answered
how to write hyper geometic function
https://de.mathworks.com/help/symbolic/hypergeom.html

4 years ago | 0

Answered
Obtaining values for variable on the left and right hand side
You can't achieve 0=0 since 0.5 / (1 + 0.2 * (x2)^2) is always positive. But if you choose x1 = (0.5 / (1 + 0.2 * (x2)^2))/(...

4 years ago | 0

Answered
How do i use ode23 if i have a spline function?
Ta = 273.15 + 10; fun = @(tt) ppval(spline(t,k),tt); fun_ode23 = @(t,T) fun(t)*(T-Ta); T0 = 273.15 + 50; tspan = [0,1]; [t,...

4 years ago | 0

| accepted

Answered
ODE45 solving rate too low
I can't see something wrong in the equation itself, but of course I don't know if the inputs have the correct units etc. But fo...

4 years ago | 0

Answered
inserting index for variable
I don't know what you mean by "I want make index for my variable", but x = 8; b = 9; w = zeros(2,1); u = zeros(2,1); for i ...

4 years ago | 0

Answered
Bayesian Optimization for constrained optimization in fmincon?
I have been doing constrained optimizations of underdetermined systems of linear equations with fmincon. Isn't "lsqlin" the app...

4 years ago | 2

Answered
making pde matlab code
Here is a simple code to check your results from pdepe: % Spatial interval L = 1; nL = 101; dL = L/(nL-1); eta = linspace(0...

4 years ago | 0

Answered
Can I use custom sum of two mean sum square cost functions for lsqnonlin?
Your output must be output = [(RecPar1(:) - TruePar1(:)) / sqrt(length(TruePar1)) ; (RecPar2(:) - TruePar2(:)) / sqrt(length(Tr...

4 years ago | 0

| accepted

Answered
Solve function:Error using sym/solve>getEqns
"qfunc" does not accept symbolic input, and your B is symbolic.

4 years ago | 1

Answered
solving an ODE with a constraint equation
As you said: You will have to couple a nonlinear solver with an ODE integrator. I changed the ODE to dy/dx = a*x because of the...

4 years ago | 0

| accepted

Answered
Sine equation in Euler Method ODE
% 2D SYSTEM SIN-COS EQUATIONS USING FORWARD EULER METHOD % solve u'(t) = F(t,u(t)) where u(t)= sqrt(t+1)*cos^2(t),sqrt(t+1)*sin...

4 years ago | 0

| accepted

Answered
How do I interpolate derivative values at endpoints with interp1?
Look at the forward (first element) and backward (last element) finite difference coefficients in the link and choose those you ...

4 years ago | 0

Answered
Where does the diffrence beetween lsqcurvefit and data come from?
Does this answer your question ? 1st code (free radius): load('data-ask.mat') fun =@(x)(xdata1-x(1)).^2+(ydata1-x(2)).^2 - x(...

4 years ago | 0

| accepted

Answered
Ax = 0 with 2 values of x known
Use lsqlin for the problem min : ||A*x||_2 s.c. x(1) = known_value_1 x(n) = known_value_2 if A has n columns.

4 years ago | 0

Answered
Problems with the diff function
syms x y M = 2*y - 2*x*y^3 + 4*x + 6; N = 2*x - 3*x^2*y^2 - 1 ; cond = diff(M,y) - diff(N,x)

4 years ago | 0

Answered
Solution of DAE-System is too linear
a = ...; b = ...; c = ...; k = ...; h = ...; f = ...; d = ...; m = ...; g = ...; e = ...; n = ...; odefun = @(t,x,y,z...

4 years ago | 0

Answered
Perform calculations on matrices stored in cells
help cell2mat

4 years ago | 0

Answered
Help with newton-raphson
f = inline('x.^2-3','x'); c0 = 2; n = 10; c = newtonRaphson(f,c0,n) function c = newtonRaphson(f,c0,n) df = @(x) (f(x+1...

4 years ago | 1

| accepted

Answered
How to create a separate function file for a piecewise function?
a = 3; b = 12; x = 0:0.01:12; plot(x,f(a,b,x)) function pw = f(a,b,x) pw = NaN(size(x)); idx = x>0 & x<b/a; jdx =...

4 years ago | 0

| accepted

Answered
I want to know x,y coordinate
f = @(t) [t.^3 + t , t.^2 + 2*t.^3]; f(0.5)

4 years ago | 0

Answered
Interp1 Function gives back NaN in second to last datapoint
Frames = [FE(33) FE(17) FE(1)]; 3Int = [x(33) x(17) x(1)]; instead of Frames = [FE(1) FE(17) FE(33)]; 3Int = [x(1) x(17) x(3...

4 years ago | 1

Answered
making pde matlab code
Setting m = 1 does not implement your equation in the image. Setting m = 1 would mean solving d(theta)/d(tau) = 1/eta * d/d...

4 years ago | 0

Answered
Different solutions of fmincon when changing x0
I wanted to ask if it is normal that fmincon can have different solutions with different x0? There can be several reasons for f...

4 years ago | 0

| accepted

Load more