HeatEquationGuide.pdf - syms x t �fines x and t as variables L=pi%Sets the length of the rod beta=3%Sets the physical parameter n=15 �cides how many
HeatEquationGuide.pdf - syms x t �fines x and t as...
symsx t%Defines x and t as variablesL=pi;%Sets the length of the rodbeta=3;%Sets the physical parametern=15;%Decides how many terms of the Fourier series to calculatefinit=x^2;%Defines the initial heat distribution in the rodfplot(finit,[0,pi]);% Plots the initial heat distributiona_n=zeros(1,n);%Defines a list of constants for the Fourier series coefficientsFourier_n=0;%Sets a function for the Fourier series solutionFourier_init=0;%Sets a function for the Fourier series initial condition