Beantwortet
I cannot give this struct as input of a custom function, how can I do?
Works without problems. Have you saved an m-file named "myfunction.m" in your working directory ? var.hold_on = 1; var.box_on...

mehr als 3 Jahre vor | 0

Beantwortet
closest value to zero excluding the first one?
out of our list of stuff to search for ? v = [-0.1 2 4 -0.5 8]; [~,i] = min(abs(v(2:end))) v(i+1)

mehr als 3 Jahre vor | 0

Beantwortet
how to solve one variable in non linear equation?
T=12; u1=400;u2=8;a=30;b=5;a2=100;A=500;c2=10;c3=12;c4=8;D0=115; b2=0.2; a=-1.1;d=11.2;m=-0.5;k1=1.5;k0=1.1;k2=2; syms t1 c...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Error using plot vectors must be the same length
You can easily test what the error is. A plot command plot(x,y) can only be successful if: x is a column vector and y is a m...

mehr als 3 Jahre vor | 0

Beantwortet
Index exceeds the number of array elements
I suggest you insert values for p1 and solve for t1. This will be easier than the other way round. format longg syms p1 t1 nm...

mehr als 3 Jahre vor | 1

Beantwortet
Extracting symbolic values from symbolic matrix
syms t q2(t) q3(t) a1 a2 n1 = [a1*q3(t);a2*sin(q2(t));0]; n1(2,1) % extract element (2,1) n1(2,:) % extract complete 2nd ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Why du/dx obtained from excel and Matlab gives different results?
If the X grid is equidistant, dudx = gradient(U,X(2)-X(1))

mehr als 3 Jahre vor | 0

Beantwortet
Desorption-Fixed bed- Initial conditions
Then set c0 = cFeed*ones(n,1) c0(1) = 0.0; q0 = qFeed*ones(n,1) as initial and boundary conditions of the desorption, if thi...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
plot a function wit cos
f=(0:10); %f0=5*10^9; c=(3*10^8); t=5*10^9; w=2*pi*f; wt=w*t; k=(wt/c); z=(0.75:30); r12=0.29; %x=0.094*cos*(k*z); y=0...

mehr als 3 Jahre vor | 0

Beantwortet
How to fix error in my DAE program?
The call to ode15s is incorrect: [t,y] = ode15s(@(t,y) reduced21(t,y,T_a),tspan,y0); instead of [t,y,ydot] = ode15s(@(t,y,ydo...

mehr als 3 Jahre vor | 0

Beantwortet
How to generate matrix from iterations?
V1 =[0 20 60 80 100]; V2 =[20 60 80 100]; itermax = 10; for i = 1:numel(V1) v1 = V1(i); for j = 1:numel(V2) ...

mehr als 3 Jahre vor | 0

Beantwortet
how could i plot x^2+(y-x^3/2)^2=1 ?
fun = @(x,y)x.^2+(y-x.^3/2).^2-1; fimplicit(fun)

mehr als 3 Jahre vor | 0

Beantwortet
How to solve PDE with two regions
Yes. Choose "a" as a grid point for pdepe. Then you can solve your system as one partial differential equation for C_B by addin...

mehr als 3 Jahre vor | 0

Beantwortet
Unable to meet the tolerance without using more than 1666 mesh points.
Seems to work (see above).

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
too many input arguments Fmincon
parametersV = fmincon(objFun,parametersV,[],[],[],[],[],[],[],options); instead of parametersV = fmincon(objFun,parametersV,[]...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
The control parameters of MILP
Read about "options" under https://de.mathworks.com/help/optim/ug/intlinprog.html

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Change the format of output answers of two variable in two equations
T_surf_Max = double(S.T_surf(1)) T_o_Max = double(S.T_o(1))

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solution of Fick's Second Law of Diffusion Equation
Then discretize d^2C/dx^2, d^2C/dy^2 and d^2C/dz^2 and use the method of lines to integrate dC(i,j,k)/dt = D*((C(i+1,j,k)-2*C(i...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Struggling to formulate ODEs in matlab for two point boundary value problem using bvp4c
To get a feeling for your system, I'd start with equation (7) and ode45 as integrator. Assume hydrostatic pressure at the inle...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to break the infeasibility of solution for the function linprog?
[x,fval,exitflag,output] = linprog(___) if exitflag > 0 % linprog was successful take action 1 else % linp...

mehr als 3 Jahre vor | 2

| akzeptiert

Beantwortet
Minimization of two simultaneous ODES with shared parameters
https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Error When Using ODE45 to solve symbolic ODE Equation : Too many input arguments.
s = 1; N_s = 3e15; V = 16.7; S = 4.6; tao_p = 3.6; tao_0 = 10e-13; v=4.82e20; R=8.31; T=295; Ed = 25; a = ((s*v*tao_0)...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
I am unable to understand the error messages and correct the errors.Can anyone correct my code?
syms x y(x) E=207e9; P=1000; m=2; n=2; Ix=(pi/(1024*m^4))*(x^2-4*m*n)^4; I1x=diff(Ix); I2x=diff(I1x); eqn = diff(y,x,4) ...

mehr als 3 Jahre vor | 0

Beantwortet
How can I plot a graph according to the results
clc clear %Newton method func = @(x,y) 10*x.^2 - 4*x.*y + 7*y.^2 - 4*sqrt(5)*(5*x-y) - 16 ; e = 0.01; i=0; n=0; b =...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
I want to plot 100 graph for T vs abs(r) for different initial condition and therefore I wrote this code, but it doesn't plotting any graph please help mem in this code.
ti = 0; tf = 1E-8; tspan=[ti tf]; KC = 2E-6; hold on for j = 1:100 y0= [(1e-2)*rand(2,1); ((-3.14).*rand(1,1) + (3.14).*ra...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to save a matrix into a number?
max2min = [ 4 3 2 1]; min2max = fliplr(max2min); max2min = str2double(sprintf('%d',max2min)); min2max = str2double(spri...

mehr als 3 Jahre vor | 1

Beantwortet
converting equation into multiple of two matrix
https://de.mathworks.com/help/symbolic/sym.equationstomatrix.html

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Inequality constraint cause infeasible results in NMPC
Your constraints say that a number should be >= -5000 (Min/Max constraint) and that it should be <= -5000 (U(2)+5000). That's ha...

mehr als 3 Jahre vor | 0

Beantwortet
How do i solve differential equation 2nd oder simbolically and numerically?
syms t y(t) sigma(t) eqn_diff = diff(y,t,2)+3*diff(y,t)+y(t)-2*sigma(t)==0; ysol(t) = dsolve(eqn_diff); var = symvar(ysol) e...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to solve method of lines on one-dimensional heat equation using Euler's method?
% Parameters k = 0.5; % Evaluate BC dx = 0.01; x = 0:dx:1; dt = 0.0001; t = 0:dt:0.5; h = 1/(length(x)-1) ; %step size ...

mehr als 3 Jahre vor | 0

| akzeptiert

Mehr laden