Beantwortet
Using lsqnonlin for deconvolution
lsqnonlin tries to adjust x, and you reset it to 0: function F=insulin(x) ... x=zeros(89,1); This destroys the complete fitt...

mehr als 3 Jahre vor | 1

Beantwortet
The following error was reported evaluating the function in FunctionLine update: Unable to convert expression into double array.
Your calculations partially produce complex and NaN values. And you cannot prevent this by trying to force them to be real. pv1...

mehr als 3 Jahre vor | 0

Beantwortet
Solve of implicity equations
You should first check whether a zero of your function really exists. It doesn't seem to be the case: alpha = 0.14; A = 3300; n...

mehr als 3 Jahre vor | 0

Beantwortet
why do I get this error in the simulation
Before calling "interp1", use % Sort array oxygen_energy_tot in ascending order [oxygen_energy_tot_sorted,idx_sort] = sort(oxy...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
ode45 with a array of vector
a1 = ...; a2 = ...; a3 = ...; b1 = ...; b2 = ...; b3 = ...; c1 = ...; c2 = ...; c3 = ...; vp = ...; tValues = linspace...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
function handle array Problem
result = integral(@fun,0,1000,'ArrayValued',1) function value = fun(a) m = [1,2]; U(3) = a + 2; V(3) = a - 2; for...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
i want to solve a set of homogeneous linear equation
Or use the following code to produce an optimal solution in the least-squares sense: A =1.0e+04*[6.6064,-3.5642,0,0;-3.5642,6.6...

mehr als 3 Jahre vor | 0

Beantwortet
is there any way to get a 2nd order polynominal through 2 points(each end point)
rng("default") syms a b c x y n = 30; % number of data points xdata = sym('xdata',[1 n]); % x values ydata = sym('ydat...

mehr als 3 Jahre vor | 0

Beantwortet
Error using plot Vectors must be the same length
As you can see above, S and f have a different number of elements. So they cannot be plotted against each other.

mehr als 3 Jahre vor | 1

Beantwortet
incorrect dimensions for matrix multiplication in piecewise function in matlab
tau = 1.0; V_D = 0.72; vi = @(t) sin(2*pi*t); f = @(t) max(vi(t)-V_D,0).*exp(-t/tau); t = 0:0.01:2*pi; plot(t,f(t))

mehr als 3 Jahre vor | 0

Beantwortet
How do I store an ODE in a vector?
Either you use the code below and work with the time derivatives after the integration to decide when the curves have flattened ...

mehr als 3 Jahre vor | 0

Beantwortet
How to implement the Gaussian radial basis function in MATLAB ?
Before you start the optimization, check whether K in your case is positive-definite. Lt = 10; p = rand(Lt,4); sigma = 1.0; ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Interface boundary condition in transient heat problem
Here is a sample code for what I wrote above: % Set parameters x1start = 0.0; x1end = 0.25; x2start = x1end; x2en...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to solve below PDE based model using finite difference scheme.
Take a grid (ai,xj) over your rectangular region with 0 = a1 < a2 < ... < an = 60 0 = x1 < x2 < ... < xm = 40 Approximate the...

mehr als 3 Jahre vor | 2

Beantwortet
Error: Array indices must be positive integers or logical values. implementing fletcher reeves method
[xmin,valormin]=fletcherreeves2([5;5],@(x) x(1)^2-x(1)*x(2)+4*x(2)^2+3*x(1)+2,@(x) [2*x(1)-x(2)+3;-x(1)+8*x(2)],10^-(6)) func...

mehr als 3 Jahre vor | 0

Beantwortet
Why do I get 'Array indices must be positive or logical values' in symsum function?
h=0.05; U=0.02; delta_t=1; v=1.846*10^-5; d=1.117; t=50; y=0.2; P=pi; n = 1:300; Fn = 1./n.*exp(-(n.^2*P^2*v*t)/(d*h^2)...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to get numerical values of nonlinear implicit function?
k = -1.5; F = @(t,y) log(abs(y)) - y.^2/2 - t - k; fimplicit(F,[0,4],'*') t = 0:0.01:0.99; y0 = 2.0; y = zeros(size(t)); f...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to write the equation in matlab I= A A* T² exp (qob/kT) exp (q(V - Rs I /kT)) (exp (-1/n) ? Why is the curve not shown in the drawing?
Maybe you mean I = A*a*T^2*exp(q*phi_b/(K*T))*exp(q*(V-I1*Rs/(K*T)))*exp(-1/n) ?

mehr als 3 Jahre vor | 0

Beantwortet
How to solve three coupled partial differential equations using matlab code?
Use MATLAB's "pdepe".

mehr als 3 Jahre vor | 0

Beantwortet
Solving economic dispatch problem
The message from "quadprog" says that no feasible solution can be found. So you will have to reconsider your constraints - it se...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
it says it cant plot because my vectors aren't the same size but they are
Check whether size(yvar) equals size(xvar). I think this cannot be true because the following code works: yvec=[6.67 17.33 42...

mehr als 3 Jahre vor | 0

Beantwortet
I'm trying to run a code to plot conversion vs catalyst mass in a packed bed reactor, but something is wrong.
You tell the integrator that you have four additional inputs to your function [W,F]=ode45(@(t,F)ODEfun(t,F,T,P_total,F0_total,R...

mehr als 3 Jahre vor | 0

Beantwortet
Bisection function to determine the value of (k) not working.
Please fill in the missing values and try again. If you don't succeed, it usually helps to plot f in the range 1e-12:1-1e-12 fo...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
2nd Order ODE Euler method not producing expected results
Not that bad. %Coefficients m1=3; m2=6; k1=1; k2=9; k3=3; c1=0.02; c2=0.09; c3=0.06; % Step sizes h=0.00005; t...

mehr als 3 Jahre vor | 0

Beantwortet
Index exceeds the number of array elements (7).
The last two loops also have to run from 1 to length(code), not from 1 to length(t).

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Summing over indices using symsum
u=symunit; Q(1)=10E-9*(u.C); Q(2)=15E-9*(u.C); Q(3)=7E-9*(u.C); Qsum = sum(Q)

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Fitting method with multiple response variables (y1, y2, y3).
rng("default") X = linspace(0, 10, 100)'; Y1 = 2*X.^2 - 3*X + randn(size(X))*0.5; Y2 = 2.5*X.^2 - 3*X + randn(size(X))*0.5; ...

mehr als 3 Jahre vor | 0

Beantwortet
sym/besseli - Too many input arguments.
There is no third argument in the symbolic function "besseli": https://de.mathworks.com/help/symbolic/besseli.html

mehr als 3 Jahre vor | 2

| akzeptiert

Beantwortet
Symbolic Computations for three non-linear equations solution
fl = [1.883806, 1.883135, 1.882170]*10^9; Qe = [161.43, 10.765, 2.5734]*10^4; syms A fu alpha eq1=fl(1)-(1+(A/(Qe(1)^alpha))...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
i am trying nonlinear for nonlinear ode using by finite difference method
You want to solve a nonlinear system of equations using Newton's method, but you didn't supply the Jacobian "df". i.e. df{i}/dx...

mehr als 3 Jahre vor | 0

Mehr laden