Beantwortet
please help me modify the code i want to simulate the temperature profile distributed along the height of the adsorption column
If you don't want to save the temperatures for all time steps, you need at least two arrays T_old and T_new such that your advan...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Fmincon finds different solutions for optimization problem in dependance of initial values
It's not unusual that the solution for optimization problems depends on the initial guesses for the optimization variables. If...

etwa 3 Jahre vor | 1

Beantwortet
Integral and inverse integral
MATLAB is not able to find the inverse: syms x Sigma= 1; Mu=5; PDF_Norm=exp(-0.5.*((x-Mu)/Sigma).^2)/(Sigma*sqrt(2*pi)); a...

etwa 3 Jahre vor | 1

Beantwortet
Euler's identity with angle in degrees
a = 30; exp(deg2rad(a)*1i) exp(a*pi/180*1i)

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
Least squares linear regression with constraints
You made a mistake in computing the correct coefficients (see below). clear all close all x11 = [0.091, 0.068, 0.086, 0.091, 0...

etwa 3 Jahre vor | 0

Beantwortet
Nonlinear regression with two variables
I don't know your inputs, but theoretically, it works: X = rand(50,2); Y = rand(50,1); % Define the model function model = @...

etwa 3 Jahre vor | 0

Beantwortet
Accessing local variables in a function.
By defining them as output variables function [x,y] = drawHexagon(sideLength, centerX, centerY) and calling the function as [...

etwa 3 Jahre vor | 2

Beantwortet
How to solve a system of distributed delay equations?
As a start, you could define three delays, namely delay(1) = tau-gamma, delay(2) = tau and delay(3) = tau+gamma, and approximate...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to use Jacobian option of odeset for ode15i while solving DAEs?
syms x1(t) x2(t) x3(t) m l g c; % DAE system eqn1 = diff(x1(t),t)-x3(t)==0; eqn2 = diff(x3(t),t)*sin(x1(t))-x2(t)*cos(x1(t)...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Symbolic simplify get wrong result
(a*b)^1/3 = (a*b)/3, not = (a*b)^(1/3)

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solving a complicated non-linear equation in Simulink
With suitable constants c1,...,c6 and substituting x = sin(sigma_A^EC), your equation can be written as c1*(x^2-c2) - c3*(x*c4-...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
What is the main difference between gradient command and diff comand
gradient: 5-1,(10-1)/2,(17-5)/2,(30-10)/2,30-17 diff: 5-1,10-5,17-10,30-17 Both are approximations to the slope of x if the sp...

etwa 3 Jahre vor | 0

Beantwortet
Symbolically solve non-linear differential equation
You don't need to solve the equation symbolically. Just solve simultaneously the two differential equations %db2/dt=b2*(c2*(1-...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solving system of four equations
syms e1 e2 e3 e4 for i=1:25 eq1=((nco+v3*e1+v22*e2+v41*e4)^2*(nh2+v4*e1+v24*e2+v33*e3)^2)-(k(i)*(n0+v*e1+v03*e3+v04*e4)^2*...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to output simple linear regression confidence limits for new values of independent variable.
My guess is that your linear model has two independent variables. That's why you had to supply a two-column vector of new X-va...

etwa 3 Jahre vor | 0

Beantwortet
Solving Matrix Equations With Unknown at Both Sides
syms T1 T3 F2 eqns = [1 -0.5 4;-0.5 2 0; 4 0 3]*[T1;0;T3]==[4;F2;5]; solve(eqns)

etwa 3 Jahre vor | 0

Beantwortet
How to plot xy, yz and xz plane contour with integration matrix equation
clear all close all clc %Constant rho = 4420; %kg/m^3 Cp = 550; %J/kg?K T0 = 303.15; %K A = 0...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can I solve non-linear equations with more equations than unknown variables using objective functions such as nonlinear least square (lsqnonlin)?
rng("default") P1 = rand(3,1); P2 = rand(3,1); M1 = rand(3,4); M2 = rand(3,4); x0 = [1 1 1 1 1]; fun1 = @(x) norm(P1-M1*[x...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Calculation of quadruple integral in combination with summation
z_array = 2:3; Z_array = 4:5; r1 = 2; r2 = 3; R1 = 5; R2 = 7; for i = 1:numel(z_array) z = z_array(i); for j = 1:num...

etwa 3 Jahre vor | 0

Beantwortet
Problem about the ode45 time steps?
You specify the times when you want ODE45 to output the solution in the array "tspan". This array is not used by ODE45 to deduc...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
Changing y tick values interval
fun = @(x)x; x = -4000:360; y = fun(x); plot(x,y) yticks(fliplr(360:-360:-4000))

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to calculate a double integral with a subfunction?
Use obj = integral2(@(theta,phi)arrayfun(@(x,y)pattern_element(f0,x,y,L,W),theta,phi),0, 2*pi,0, 2*pi) instead of obj=integra...

etwa 3 Jahre vor | 2

Beantwortet
It always gives the error of "Empty sym: 0-by-1"
The result is correct: You have 26 equations of the form 1800 - c(i)*Fe = 0 for one variable Fe to be solved for, but 26 dif...

etwa 3 Jahre vor | 0

Beantwortet
error: matrix dimensions must agree
K_a in your function definition is a scalar. Thus you have to change x0 to be a scalar, too. clc close all clear background...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
What is the problem for the following matlab code for drawing contour plots of R0 against two parameters?
alpha= 1.0*0.0241; beta=0.001936 ; gamma=0.0020255; T=23.3; T0=23; mu_ref = 0.0017; mu1=0.039 ;mu2=0.002894; L=8; L0=8 ; delta...

etwa 3 Jahre vor | 0

Beantwortet
fmincon is not working
You must define F = @(x) fun(x(1),x(2)) and pass "F" instead of "fun" to fminunc.

etwa 3 Jahre vor | 0

Beantwortet
How to integrate a complicated function?
https://www.wolframalpha.com/input?i=integration&assumption=%7B%22C%22%2C+%22integration%22%7D+-%3E+%7B%22Calculator%22%7D&assum...

etwa 3 Jahre vor | 0

Beantwortet
Function optimization with some conditions conditions
The dimensions would be correct if you use b = [b1;b2.';b3.']; instead of b = [b1;b2;b3]; but you'd better post the problem ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do you go about guessing for fitting parameter initializations?
This is a linear fitting problem for which you don't need initial guesses for the parameters: Data = [0.006 334 0.011 276 ...

etwa 3 Jahre vor | 0

| akzeptiert

Mehr laden