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

This preview shows page 1 - 2 out of 2 pages.

syms x t %Defines x and t as variables L=pi; %Sets the length of the rod beta=3; %Sets the physical parameter n=15; %Decides how many terms of the Fourier series to calculate finit=x^2; %Defines the initial heat distribution in the rod fplot(finit,[0,pi]); % Plots the initial heat distribution a_n=zeros(1,n); %Defines a list of constants for the Fourier series coefficients Fourier_n=0; %Sets a function for the Fourier series solution Fourier_init=0; %Sets a function for the Fourier series initial condition
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read both pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture