Answered
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)

3 years ago | 0

Answered
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...

3 years ago | 0

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

3 years ago | 0

| accepted

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

3 years ago | 0

| accepted

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

3 years ago | 0

| accepted

Answered
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))

3 years ago | 0

| accepted

Answered
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...

3 years ago | 1

| accepted

Answered
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...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 2

| accepted

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

3 years ago | 0

| accepted

Answered
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)...

3 years ago | 1

| accepted

Answered
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) ...

3 years ago | 0

Answered
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 =...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

| accepted

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

3 years ago | 1

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

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

Answered
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...

3 years ago | 1

| accepted

Answered
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 ...

3 years ago | 0

| accepted

Answered
I need help to make graphs please
See above. I added four lines to your code to plot the results and changed the line flux(index)=fluxp+fluxe0+fluxe1+fluxe2; to...

3 years ago | 1

| accepted

Answered
The proper way to sample 3 normally or lognormal distributed variables added up to 1
You can define a common probability distribution of the three variables on the triangle x + y + z = 1, x, y, z >= 0 but this c...

3 years ago | 0

Answered
How can I constrcut this matrix for a problem?
If x = [x0,x1,...,xn] is an 1x(n+1) row vector, you could use M = zeros(n+1); for i = 1:n+1 M(i,:) = psi(x(1:n+1)-x(i)); ...

3 years ago | 0

| accepted

Answered
Are the algorithms used in mldivide direct solvers?
Are the algorithms used by "mldivide" for any input direct solvers (not matter if (not) sparse, (not) symmetric, (not) banded et...

3 years ago | 0

Answered
how to write an equation the it is function of itself (solar cell current equation)
I guess you want to solve for J ? Then define fun_J = @(J) J - (J_PH - J0*(exp(q*(V+J*R_S)/(k_B*T))-1)-(V+J*R_S)/R_SH) and u...

3 years ago | 0

Answered
How to write the below equation in MATLAB
R = gammainc(x/theta,k)

3 years ago | 0

Answered
routing problem optimization code
https://math.stackexchange.com/questions/1658457/longest-path-with-constraint

3 years ago | 0

Answered
why do I get "Array indices must be positive integers or logical values"
Most probably you mean Dnorm = Dsm./Dstd instead of Dnorm = Dsm./Dstd(D)

3 years ago | 0

| accepted

Answered
how to reduce its computing time?
Here is the code for the first loop. You can do it for the other loops in the same manner. u=[30 40 50 70]; b=u; [~,C]=size(b...

3 years ago | 0

| accepted

Answered
I have to output results (z1 and z2) so the minimum value in Z1 I want to find the value in the same index in Z2, they are 4 rows and 9 columns.
%the output of the code are 2 tables z1 and z2, each consists of 4 rows and 9 coloumns, so if the the minimum value in z1 coloum...

3 years ago | 0

Answered
I'm not getting any output here, can anyone please tell me what's the issue here?
for i=1:(length(time)-1) instead of for i=1:(length(t)-1)

3 years ago | 0

Load more