Beantwortet
Finding Extremum of Multivariate Functions
R(1,2)=0.7844; R(1,3)=0.7844; R(2,2)=0.6202; R(2,3)=-0.2021; R(3,3)=0.5864; x0 = 0.5*ones(10,1); lb = -1*ones(10,1); ub ...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
Problem in solving a Fokker-Planck equation
The order of your loops is wrong. Try Nx=100;Ny=100;Nt=1000; xmin=0;xmax=3; ymin=0;ymax=3; dx=(xmax-xmin)/(Nx-1); dy=(ymax-...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
What is the difference between "no feasible solution found" and "the problem is infeasible" messages in LSQLIN?
"No feasible solution found" means: there might be a feasible solution for your problem, but I was not able to find it. But I gi...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
Strange temperature output for 2D heat equation
% Material properties rho=7850; Lambda=50; cp=477; alpha=Lambda/(rho*cp); % Geometry and mesh L = 0.1; nx = 10; ny = n...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
Getting very large numbers for solutions of a system of equation
syms x y z q r theta_0 = 0; beta = 0.5; U=exp(2*i*theta_0); eqn1 = (U*beta*besselj(0,2)-1)*x + (U*beta*besselj(1,2))*y + (...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
error in running my optimization code
I assume that "yexpected" is a matrix of size 49x3. yexpected=table2array(Book65); p0 = [3 25 25 12 1 0.5 1]; sol = lsqnonlin...

fast 3 Jahre vor | 0

Beantwortet
How can to compute the following case?
D = load("D.mat"); D = D.D; n = size(D,1); m = size(D,2); distance = zeros(n,m,n,m); for i=1:n for j=1:m ...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
Plot a nx2 matrix as points
A=[0.5 2; 1.0 -0.8; 1.5 -2.5]; plot(A(:,1),A(:,2),'o')

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solve two equations for one variable
syms P_st vdq_st_abs Vabs delta_st Vangle Xg Q_st real eq1 = P_st - vdq_st_abs * Vabs * sin(delta_st - Vangle) / Xg == 0; eq2 ...

fast 3 Jahre vor | 0

Beantwortet
non linear regression problem. fitnlm gives error
Look at the values of K and B. Do you really want to approximate B by a*K^b ? format long K = load("FITDATAK.mat"); K = K.FIT...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Am I doing thid correct. pdepe function
x = 0:0.1:1; t = 0:0.05:0.5; m = 0; u = pdepe(m,@PDEeqn1,@initial1,@bc1,x,t); plot(x,[u(1,:);u(2,:);u(3,:);u(4,:);u(end,:)])...

fast 3 Jahre vor | 0

Beantwortet
How to solve coupled systems of PDEs and ODEs using method of lines
http://www.scholarpedia.org/article/Method_of_lines/example_implementation https://www.sciencedirect.com/science/article/abs/pi...

fast 3 Jahre vor | 0

Beantwortet
integral2 for a non-scalar matlabFunction
"intagrand_temp" is a 5x3 matrix of symbolic functions in eta and zi. I don't understand which scalar-valued function(s) you wan...

fast 3 Jahre vor | 1

Beantwortet
How to check the degree of parallelism
The intersection of P1 and P2 is given by x = origin1 + directions1*lambda the intersection of P1 and P3 is given by x = orig...

fast 3 Jahre vor | 1

Beantwortet
Hi i have created a code for adsorption process breakthrough curve following one of the examples, however i still have some orange cations around please help
You solve in q, not in qstar. Thus q=y(Nz+1:2*Nz); instead of qstar=y(Nz+1:2*Nz); Further, I doubt that qstar(i)=qm.*ks.*c...

fast 3 Jahre vor | 0

Beantwortet
Error with ode45 in line 89. Trying to use ode 45 to give data on a 4x4 state space matrix
M1=1; M2=1; K1=2; K2=2; B1=1; B2=1; x1_0=1; v1_0=1; x2_0=0; v2_0=1; %% equations q0=[ x1_0 v1_0 x2_0 v2_0]; dQdt = ...

fast 3 Jahre vor | 0

Beantwortet
How to use fminbnd but with multiple variables
In the case above, your objective function is separable in the optimization variables. Thus you can solve two independent proble...

fast 3 Jahre vor | 1

Beantwortet
How can I obtain all possible combinations of 3 decimals whose sum equals 1, without running into memory and space issues?
If you have some time, you can try I = 0:0.001:1. Why don't you use the code from the File Exchange ? I = 0:0.01:1; n = num...

fast 3 Jahre vor | 0

Beantwortet
Help creating an array with uniformly distributed random numbers (row-wise) comprised between 0 and 1, with each column having a sum of 1
https://uk.mathworks.com/matlabcentral/fileexchange/9700-random-vectors-with-fixed-sum You cannot expect the usual uniform dist...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
How can I input sum over in function depend on time?
Never make changes in the RK4 function. Changes have to be made in the call to RK4 and in f. tstart = 0; tend = 100; dt = 0....

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solving stokes flow use pde toolbox
The (simplified) Navier-Stokes equations need a special numerical treatment and cannot be solved by a general-purpose code like ...

etwa 3 Jahre vor | 2

Beantwortet
How do i fix the error that i am getting?
Remove the semicolon behind the line pivotColumns = rrefA(:,1:end-1); execute the code and see if it makes sense to insert the...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
try to find hessian matrix
The vector of independent variables is (x1,x2,...,xn): syms i k n = 3; x = sym('x',[1 n]) f = n*log(k) - n*log(1/n*sum(x.^k)...

etwa 3 Jahre vor | 0

Beantwortet
Integration time step in ODE45 Matlab
If you use a two-element vector for tspan only giving the start and end time of integration, the values T(i+1)-T(i) (i=1,...,end...

etwa 3 Jahre vor | 0

Beantwortet
I am struggling to set a maximum value for a output for a function. I have nested my function in another but it is giving an error.
Instead of programming if-statements within the function routine and setting parameters depending on the actual time t, you shou...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Getting this error : Operator '==' is not supported for operands of type 'cell'. what should I do?
https://uk.mathworks.com/help/stateflow/ref/strcmp.html

etwa 3 Jahre vor | 0

Beantwortet
Problem with convergence using newtons method
Use PHI = matlabFunction(phi,'Vars',{n,k}) jacob_PHI = matlabFunction(jacob_phi,'Vars',{n,k}) n0 = -0.3; k0 = 3.4; instead ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Iterative Process to find a variable in which two equations are equal and opposite
Here is at least one solution for h: % Equation Eo=1; Uo=1; Fc=1.03; Wc=2*pi*Fc; b=0.3; Ed=100; Ud=1; h0 = 10; fun = @...

etwa 3 Jahre vor | 0

Beantwortet
Error using Time dependant Boundary Conditions with PDEPE
If "time" is the array corresponding to the data matrix, use data_actual = interp1(time,data,t) and set pr = [data_actual(1)...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solving nonlinear equation with parameter
Tau = 0:0.01:1; kc0 = 270; Ea1 = 21500; Ea2 = 121500; n = 0.63; eps = 0.52; Cch4 = 0.2; Temp = 800 + 273; kcmax = kc0*ex...

etwa 3 Jahre vor | 0

| akzeptiert

Mehr laden