% CAMILO PEREZ FOR CISC 106-010 % (Heavily edited by P. Conrad, 10/02/06) % graph the change in temperature from a chemistry experiment % To read the data file you have to use the following command. load exper.dat; % DEFINE Temperature and Chemical according to the data file. temperatureCelsius = exper(:,2); chemicalMl = exper(:,1); % PLOTTING: We can apply grids, labels, titles, etc... plot(chemicalMl, temperatureCelsius); title('Graph of temperature change after chemical Y addition'); xlabel('Amt of Chemical Y in ml'); ylabel('Temp in Celsius 10 sec after addition of chem Y'); grid on; % HERE COMES THE HARD AND TRICKY PART: Make files readable % in the webpage. % create a directory for the image file to be on the web % the -p means "make all the directories on the path" !mkdir -p ~/public_html/chem101 % this is like doing a "save as" in the graphical version of the % matlab interface, and saving the plot as a JPEG file print -djpeg ~/public_html/chem101/exper1.jpg % this commands makes EVERYTHING underneath the public_html % directory readable on the web (-R stands for "recursive", % 755 is the code that allows the web server to read the % files and make them available) !chmod -R 755 ~/public_html