Respondida
Visualizing 2D Slices of a 3D Shape Subject to 3D Heat Equation and Boundary Conditions
I have no experience with the PDE toolbox, but it seems from the error message that you defined a stationary, not a time-depende...

alrededor de 3 años hace | 0

Respondida
Trying to find a solution for nonlinear ODE
The variables are ordered as [y(1) y(2) y(3) y(4)] = [p dp/dx q dq/dx]. You will have to add the boundary condition part. syms...

alrededor de 3 años hace | 0

| aceptada

Respondida
problem in for loop not working in fixed point iteration while loop
Maybe like this ? clear all load('results.mat') N_pr = 99; P_sat = Pb; P_abandon = 1700; delh_pr = (P_sat-P_abandon)/N_pr;...

alrededor de 3 años hace | 0

| aceptada

Respondida
Plotting the 3D Heat Equation in 2D Slices
Your implementation of Explicit Euler looks correct. If you want larger time steps and faster performance, use an ODE solver li...

alrededor de 3 años hace | 1

Respondida
How to get the available solution of the singular matrix equations?
The system cannot be solved with equality because rank(A) = 68 while rank([A,b]) = 69. You can only try to find a vector x that...

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

| aceptada

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

alrededor de 3 años hace | 1

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

alrededor de 3 años hace | 1

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

alrededor de 3 años hace | 1

| aceptada

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

alrededor de 3 años hace | 0

Respondida
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 = @...

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 2

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

alrededor de 3 años hace | 1

| aceptada

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

alrededor de 3 años hace | 0

| aceptada

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

alrededor de 3 años hace | 0

| aceptada

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

alrededor de 3 años hace | 1

| aceptada

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

| aceptada

Respondida
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*...

alrededor de 3 años hace | 0

| aceptada

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

| aceptada

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

alrededor de 3 años hace | 0

| aceptada

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 1

| aceptada

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

alrededor de 3 años hace | 1

| aceptada

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

alrededor de 3 años hace | 2

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

alrededor de 3 años hace | 0

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

alrededor de 3 años hace | 0

| aceptada

Cargar más