Need help initializing a PDE boundary condition

조회 수: 1 (최근 30일)
Kelly
Kelly 2013년 2월 5일
I'm working with the heat equation (PDE), and I'm unsure how to set up my boundary conditions in a Matlab script. I need to initialize the boundary condition U(x=0) = t(6-t)
equation %(U*x-1-2U*x+U*x+1)/(x^2)
dt = 0.01; % time step dx = 0.01; % distance step K=0.002; % the constant value
%initialize vectors for distances 0 to 5 and time 0 to 20 time = 0:dt:20; t = length(time); x = 0:dx:5; row = length(t); col = length(x);
% Initialize temperature array U = zeros(row,col);
initialize the surface boundary condition U(x=0) = t(6-t)

답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometry and Mesh에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by