Respondida
How to make one matrix?
Either use a cell array or dimension the matrix to have the maximum number of columns of the 100 row vectors: A = [1 23 45]; B...

más de 2 años hace | 1

| aceptada

Respondida
Logarithmically space a vector
Maybe you mean numFilts=32; CenterFreqs = logspace(log10(50), log10(8000), numFilts) plot(1:32,CenterFreqs)

más de 2 años hace | 0

| aceptada

Respondida
How to save data in for comend when cubic equation need to be solved
t = 293:303; for i = 1:numel(t)%Temperature range T = t(i); Mm=0.01;%Input SA=1;%Input UnSA=1;%Input T1=1/298;%The rever...

más de 2 años hace | 1

| aceptada

Respondida
System of equations with ode45
Errors are due to initial conditions? Not only. The code must look somehow like this: N = 10; M = zeros(2*N); M(1,1) = 1; M...

más de 2 años hace | 0

Respondida
Help me figure out what the error is. This is the first time I use matlab. Optimization problem with thirteen variables.
x0 = zeros(13,1); lb = zeros(13,1); ub = inf(13,1); sol = fmincon(@fun1_optim,x0,[],[],[],[],lb,ub) fun1_optim(sol) functio...

más de 2 años hace | 1

Respondida
geometric rv code user defined function
t=0:10; p=0.95; f=geometric_rv(t, p) z=pdf('Geo', t, p) figure; plot(f); hold on; stem(z); legend('User-define...

más de 2 años hace | 0

Respondida
Can someone helps me to solve the error in this code?
You mean ia = (10^-7)*(exp(-(Eexc/R)*((1/T)-(1/298)))); ic = (10^-3)*(exp(-(Eexc/R)*((1/T)-(1/353)))); instead of ia = (10^...

más de 2 años hace | 0

Respondida
Circular dependency in function and optimization problem
Define r as a third optimization variable and use the nonlinear constraint function "nonlcon" as function profit = optmprob(x) ...

más de 2 años hace | 0

| aceptada

Respondida
How can I simplify a very complicated derivative (when using simplify does not help much)?
You can try nsteps = 100; simplified_dPi_dgamma = simplify(dPi_dgamma,'Steps',nsteps)

más de 2 años hace | 0

Respondida
Setting 'ReturnCondition' to true when attempting to use solve results in "Unable to find explicit solution"
Rewriting your equation gives the following result. It may happen that the squaring on both sides gives additional solutions tha...

más de 2 años hace | 0

| aceptada

Respondida
non linear partial diferential equation
I don't see a similarity to the heat equation. You will have to discretize the left-hand side of the equation and use ode15s to...

más de 2 años hace | 0

| aceptada

Respondida
求助:编写程序求解积分方程中的参数k的值
gamma_wc = 0.38; t_ITZ = 40; D_c = 0.488; lambda = 1.08; fun = @(k) 125/(1+3.15*gamma_wc)-(125-t_ITZ)*D_c-integral(@(x)D_c*(...

más de 2 años hace | 1

Respondida
Algae growing. Concentration curve problem
Here is a code for a simple heat-conduction equation dT/dt = d^2T/dz^2 T(z,0) = 0 T(0,t) = 200 T(1,t) = 340 T(0.5,t) = 90 ...

más de 2 años hace | 0

Respondida
Usage of ode function
I assume you know r0=r(t=0) and v0=v(t=0). Then r = r0 + cumtrapz(t,(a.*F_yf - b.*F_yr)./I) v = v0 + cumtrapz(t,(F_yf+F_yr-m....

más de 2 años hace | 0

Respondida
How to solve the error "Error using sqpInterface Nonlinear constraint function is undefined at initial point. Fmincon cannot continue." Error occurred when calling NLP solver
Before calling "fmincon", call the constraint function with your initial vector. My guess is that it returns NaN or Inf for some...

más de 2 años hace | 0

Respondida
Passing out additions parameters after ODE solver.
sol = adsorptionSolver(t,z,yF,TPF) for i = 1:size(sol.y,2) [~,velocity(:,i)] = adsorptionModel(sol.x(i),sol.y(:,i),z(2)-z(...

más de 2 años hace | 0

| aceptada

Respondida
Using bvp4c for coupled second order ODEs. Issue in calling bvp4c.
guess = bvpinit(y, uinit); y must be the spatial mesh, uinit must either be a function handle that returns a 4x1 vector of in...

más de 2 años hace | 1

| aceptada

Respondida
Saving an extra variable from PDEPE
After the computation with "pdepe" is completed, call "pdeval" to get the spatial derivatives of your solution on the x-mesh and...

más de 2 años hace | 0

| aceptada

Respondida
bvp5c:Unable to solve the collocation equations -- a singular Jacobian encountered
I get syms x1 x2 x3 x4 x5 x6 real syms D11 D12 D13 D22 D23 D33 real syms u l1 l2 l3 l4 l5 l6 f1 f2 f3 f4 f5 f6 h1 h2 h3 b1 b2...

más de 2 años hace | 0

Respondida
Unable to get the following DAE system of equations solved
The time derivative of the first equation is 1e45 at the beginning. Check your parameters and their units. %% DAE of solution ...

más de 2 años hace | 0

Respondida
How to solve Ax=b with some all knowns except some x values
This gives 2 equations in 1 unknown. You must be lucky if you get a value for # that satisfies both equations. In this case, it ...

más de 2 años hace | 1

Respondida
difficulty solving simulataneous equations
syms Ra Rb La Lb Va Vb iaD ibD ia ib eqns = [Lb*ibD - La*iaD + Rb*ib - Ra*ia + Vb == Va, iaD == -ibD] S = solve(eqns, [iaD,ib...

más de 2 años hace | 0

Respondida
Calculus Variational; code for finding the value of two constants for 2 values of the variable
I didn't check whether the Euler equation gives x(t) = 5*t^3/6 + c1*t + c2, but if this is the case, you can get c1 and c2 via ...

más de 2 años hace | 0

Respondida
fsolve not varying input variable
I included your code and inserted the line norm((fun(x0+[0 0 0 0 0 sqrt(eps)])-fun(x0))) before your call to "fsolve". sqrt(e...

más de 2 años hace | 1

| aceptada

Respondida
I should get a straight line graph in this equation after substituting initial conditions. I dont know where I am getting wrong. Can anyone help me with this?
For which solution variable do you expect a line as solution ? syms t y(t) Dy = diff(y,t); D2y = diff(y,t,2); m=1; k=1; c=...

más de 2 años hace | 0

Respondida
below are the codes to solve heat transfer using implicit and explicit method but my implicit method is showing huge error, what is wrong on the implicit method
Implicit scheme means: (ut(i,j+1)-ut(i,j))/dt = (ut(i-1,j+1)-2*ut(i,j+1)+ut(i+1,j+1))/dx^2 or ut(i,j+1)/dt - (ut(i-1,j+1)-2*...

más de 2 años hace | 0

Respondida
whether meshes affect computational step lengths in pdepe
Adaptive in x: no. Adaptive in t: yes. Thus the x-mesh affects computational accuracy, the t-mesh not. The accuracy in t is infl...

más de 2 años hace | 1

| aceptada

Respondida
calculate the perimeter of a polygon arranged in space
After reading the x/y data, sum up the lengths of the line segments that constitute the circumference: perimeter = 0; for i = ...

más de 2 años hace | 0

Respondida
Differential Equation - Integral Equation
syms r z k eqn = int((20-1.19e8*r^2)/(1.19e8*r^2),r,30e-6,40e-6)==int(0.54*8*1e-3/4e3,z,0,k); knum = solve(eqn,k) knum = doub...

más de 2 años hace | 0

| aceptada

Respondida
can anyone help me to get rid of the error not enough input arguments in line 7?
x0 = [10; 0]; Time_Span = [0, 40.0]; [t_ex2, x_ex2] = ode45(@ODE_Damped_Spring, Time_Span, x0); figure; plot(t_ex2, x_ex2(:...

más de 2 años hace | 0

| aceptada

Cargar más