回答済み
I am getting error "Index in position 2 exceeds array bounds (must not exceed 6)"
You should try [u,s,v]=svd(xi); instead of [u,s,v]=svd(xi,0);

約3年 前 | 0

回答済み
3D Heat Equation in PDE Solver
T_center = interpolateTemperature(results, 5,5,0.5); You didn't specify the times at which you want the temperature to be suppl...

約3年 前 | 0

回答済み
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...

約3年 前 | 0

回答済み
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...

約3年 前 | 0

| 採用済み

回答済み
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;...

約3年 前 | 0

| 採用済み

回答済み
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...

約3年 前 | 1

回答済み
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...

約3年 前 | 0

回答済み
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...

約3年 前 | 0

| 採用済み

回答済み
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...

約3年 前 | 1

回答済み
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...

約3年 前 | 1

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

約3年 前 | 1

| 採用済み

回答済み
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...

約3年 前 | 0

回答済み
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 = @...

約3年 前 | 0

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

約3年 前 | 2

回答済み
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...

約3年 前 | 1

| 採用済み

回答済み
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)...

約3年 前 | 0

| 採用済み

回答済み
Symbolic simplify get wrong result
(a*b)^1/3 = (a*b)/3, not = (a*b)^(1/3)

約3年 前 | 0

| 採用済み

回答済み
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-...

約3年 前 | 1

| 採用済み

回答済み
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...

約3年 前 | 0

回答済み
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-...

約3年 前 | 0

| 採用済み

回答済み
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*...

約3年 前 | 0

| 採用済み

回答済み
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...

約3年 前 | 0

回答済み
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)

約3年 前 | 0

回答済み
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...

約3年 前 | 0

| 採用済み

回答済み
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...

約3年 前 | 0

| 採用済み

回答済み
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...

約3年 前 | 0

回答済み
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...

約3年 前 | 1

| 採用済み

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

約3年 前 | 1

| 採用済み

回答済み
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...

約3年 前 | 2

さらに読み込む