Naveen Krish
Followers: 0 Following: 0
Feeds
提问
I need to set up my code for Central difference scheme
Write a MATLAB code to numerically solve the abovementioned ODE using the centraldifference scheme numerical difference scheme d...
2 years 前 | 0 个回答 | 0
0
个回答提问
Index in position 2 exceeds array bounds. Index must not exceed 7. Error in ftcsimplicit (line 39) plot(x,u(:,7200),'-',x,u(:,14400),'-',x,u(:,21600),'-',x,u(:,28800),x,u(:,3
% Chlorine decay using FTCS Implicit method clear; % Parameters to define the chlorine dacay in the pipe and the range in sp...
2 years 前 | 0 个回答 | 0
0
个回答提问
To solve using implicit FTCS scheme
Hi im working on a project on chlorine decay during flow. I would really use some help. I cant able to figure out how to start w...
2 years 前 | 0 个回答 | 0
0
个回答提问
File: laxexplicit.m Line: 41 Column: 31 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
% Chlorine Decay Flow for the Lax method to solve the advection equation clear; % Parameters to definr the advection equatio...
2 years 前 | 1 个回答 | 0
1
个回答提问
Figure 2 not working
% Heat diffusion in one dimensional wire within the explicit FTCS method clear; % Parameters to define the heat equation and t...
2 years 前 | 0 个回答 | 0
0
个回答提问
I need to change the boundary condition in the code below
% Heat diffusion in one dimensional wire within the explicit FTCS method clear; % Parameters to define the heat equation and...
2 years 前 | 1 个回答 | 0
1
个回答提问
Index in position 1 is invalid. Array indices must be positive integers or logical values. Error in explicitftcs (line 28) u(Nx+1,k) = 1.; >> u(Nx+1,k) = 1.; Index in
% Heat diffusion in one dimensional wire within the explicit FTCS method clear; % Parameters to define the heat equation and t...
2 years 前 | 2 个回答 | 0
2
个回答提问
how to write this boundary conditions in matlab code
This is my boundary condition i need to use explicit ftcs numerical difference scheme 𝐶|𝑥=0 = 1 mg/L, 𝑑𝐶 𝑑𝑥 |𝑥=𝐿 = 0, 𝐶|𝑡=0 =...
2 years 前 | 0 个回答 | 0
0
个回答提问
Error using plot Vectors must be the same length. Error in Eulerrk (line 54) plot (t,h(:,1),A,xR,yR(:,1))
clc clear all %%RK Method %h=[3600 1800 900 450 225]; h = 3600; A0=1; B0=3; P0=0; K=5*10^-5; Yb=1; Yp=0.15; xR ...
2 years 前 | 1 个回答 | 0
1
个回答提问
Not enough input arguments. Error in odefun (line 2) y1 = y(1); Error in bvp4c (line 5) sol =bvp4c(odefun,bcfun,solinit);
function dydx = odefun(y,x) % equation to solve y1 = y(1); y2= y(2); dy1_dx = y(2); dy2_dx = [U*y2+K*y1/D]; dy_dx = [dy_dx;...
2 years 前 | 2 个回答 | 0
2
个回答提问
File: bvpfcn.m Line: 1 Column: 23 Invalid use of operator.
Hi, I'm doing a project on chlorine decay in water distribution pipes, to solve this ODE with the following Matlab's BVP4C func...
2 years 前 | 2 个回答 | 0
2
个回答提问
To plot the absolute percent error
Hi, I'm doing a project on formation of disinfection byproducts during water treatment to solve this problem i have to plot the ...
2 years 前 | 0 个回答 | 0
0
个回答提问
File: bvpfcn.m Line: 1 Column: 23 Invalid use of operator.
function dydx = bvp4c(@ode,@bc,solinit); % equation to solve plot(r.x,r.y(1,:),'--o'); title('chlorine decay') xlabel('pipe...
2 years 前 | 0 个回答 | 0
0
个回答提问
File: bvpfcn.m Line: 1 Column: 23 Invalid use of operator.
function dydx = ode(y, x) D = 0.1; % m2/s U = 1; % m/s K = 1e-6; % 1/s dydx = [y(2)* (U * y(2) + K * y(1)) / D]; %...
2 years 前 | 0 个回答 | 0
0
个回答提问
need to use this analytical solution to plot the absolute percent error in the concentration A at each time step for Euler's method
%% Euler nsteps = 12; t = zeros (nsteps,1); A = zeros (nsteps,1); B = zeros(nsteps, 1); P = zeros(nsteps,1); A(1) = 1; B(...
2 years 前 | 1 个回答 | 0
1
个回答提问
Unrecognized function or variable 'A'. Error in ode89vsrk (line 37) plot (t,A,x,Y(:,1))
clc clear all %% ODE89 A0=1; B0=3; P0=0; K=5*10^-5; Yb=1; Yp=0.15; tspan = [0 43200]; [x,Y] = ode89(@(t,Y) odefun...
2 years 前 | 1 个回答 | 0
1
个回答提问
Not enough input arguments Error in bvpfcn (line 5) dydx = [y(2)*(U*y(2)+K*y(1))/D];
Error in bvpfcn (line 5) dydx = [y(2)*(U*y(2)+K*y(1))/D];
2 years 前 | 1 个回答 | 0
1
个回答提问
Incorrect use of '=' operator. Assign a value to a variable using '=' and compare values for equality using '=='.
D=0.1; U=1; K= 1*10^-6; ci=3; co=2; L=1; y(1) =C; y(2) = dc/dx; y(2)'=dc^2/dx^2; function dcdx = bvpfcn(c,x) % euation ...
2 years 前 | 0 个回答 | 0
0
个回答提问
I got two different graphs from my code like ODE89 and Eulers method. I need to compare the graphs in it.
ODE89 clc clear all A0=1; B0=3; P0=0; K=5*10^-5; Yb=1; Yp=0.15; tspan = [0 43200]; [t,Y] = ode89(@(t,Y) odefun(t,...
2 years 前 | 1 个回答 | 0
1
个回答提问
I want to comapre my A,B and P against time and want to compare my ODE89 function with Eulers method with a timestep of 3600
nsteps = 12; t = zeros (nsteps,1); A = zeros (nsteps,1); B = zeros(nsteps, 1); P = zeros(nsteps,1); A0 = 1; B0 = 3; P0 = ...
2 years 前 | 1 个回答 | 0