%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % my scripts for bits and pieces of the Tridiagonal demonstration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function seehr(h,r) % seehr - makes a pretty bar plot to plot water height h vs input flux r % that is the solution of the problem A*h=r % N=length(h); bar(h,'b'); % plot water height as a bar plot hold on; bar([0 ; r(2:N-1) ; 0],'r'); % plot the forcing function RHS (without the end points) xlabel('Tank number'); ylabel('height or flux'); legend('water height','input flux'); return