The advent of the personal computer has been one of the most significant factors impacting laboratory work in the past decades. These tools are now readily available and can be used at every level of work. In the 1960's computer use was limited to larger institutions and invariably centered on the use of large main frame computers, primarily for data analysis. Their use was restricted to those with the willingness to learn complex high level languages, and the time and energies to write their own programs. Computers were somewhat unfriendly and the author can recall the most dreaded, yet common lament The computer is down, again! Central main frames and their later mini computer counterparts all too often went down in the midst of your work. The adage to save and save often was learned very quickly.
Although there were other pioneers, it was the introduction of the Radio Shack TRS-80 and the Apple computer systems which began a revolution. Those systems were closely followed by the introduction of the Commodore PET, and Kaypro computers. These early machines were marvels for their time, but were generally lacking in random access memory (RAM) and speed. Manufacturers also attempted to corner markets by intentionally designing hardware and software that was incompatable with other manufacturers (such as the lack of Commodore's use of ASCII [American Standard Code for Information Interchange] in its PET system and the substitution of its own standard, affectionately known among users as the Half-ASCII). Much of this changed in 1980 with the introduction of the IBM-PC. This machine, backed by the industry giant, set the standard that is still in vogue. Apple was well entrenched in academic circles by this time and has not given in to the pressure for an IBM standard. Apple responded with the McIntosh line, and the battle lines have been drawn since.
Which is a way of introducing the first decision that one faces when considering the use of a personal computer in cell biology. Which system should one invest in? For many institutions, this is not a consideration since one or another system has already been purchased by the institition. For others it remains, because either there is no computer available or there are many types available within the institution.
Let me settle the author's prejudice up front. It doesn't make any difference which hardware system you use. The important point is that the computer is used as a tool to enhance learning in the laboratory. An installed Radio Shack TRS-80 can be as useful as a new McIntosh II, Compaq 386/33, or a NeXT. To those still needing to acquire a computer system, talk with the institutional academic computing center and follow their advice. If you do not have such a center, contact one at the nearest university and follow their advice.
Of course availability of software programs should be considered, but in general, you can find what you need. Newer, faster and bigger machines make some projects more pleasant (fun?) but are rarely necessary. For most undergraduate instructional use of computers in the laboratory, any basic personal computer should suffice. It is a rare event in the cell biology laboratory where multi-tasking (having more than one program running simultaneously), networking (connection to other computers), or extensive real-time data analysis is required. In many instances, these activities actually detract from the student's ability to grasp the principle of the exercise. The computer may act like the Siren's of the Odyssey (which you may recall ended in a shipwreck).
Having said this, it is now appropriate to indicate that most of the hardware and software discussed in this section is that appropriate to the IBM standard (generally referred to as IBM compatable, and running under PC-DOS or its counterpart, MS- DOS). This is purely due to the use of this standard at the author's institution and is not meant as an endorsement of this standard over any other (such as Apple).
LANGUAGES Before discussing commercial programs, a brief note should be inserted about programming a computer. Better than 90% of all the uses of a computer in lab can be performed using commercially available programs. For many this number can easily approach the 100% mark. In other words, you may never have to actually write your own program.
However, as often happens, you may become quite dissatisfied with the program established by another and wish to modify it to your own purpose. It is at this point in time that you will need to write a program.
The list of available computer languages for writing such a program is as long as the list of computers. Everyone has their favorite, and nothing can provoke a heated discussion among computer users faster than the merits (or demerits) of any given program language. Computer hackers love to code programs in what is known as assembly language. This is nearly an unreadable code that takes immediate command of the machine and is the closest to machine code , the only code which the computer actually uses. Commercial programs are usually written in assembly code or something close, in order to increase performance speed. It is rarely used by cell biology laboratories.
All beginners start with a language which needs to be interpreted before assembly and conversion into machine language. Since all of this must take place, these languages tend to slow down performance, unless compiled. Unquestionably, the most common language used is some version of BASIC (Beginners All- purpose Symbolic Instructional Code). There are several reasons for this. First, it is usually bundled with the equipment (the hardware) and thus is readily available. Second, it follows a straight-forward algebraic logic in its construction. It has simple commands which are almost intuitive in their use. And finally, while it is not required that programs be unstructured, it is probably the most forgiving language available for sloppy programming.
Newer enhanced versions of BASIC (True-Basic, Turbo Basic or Quick Basic 4.5) have taken this language and elevated it to a point where it can compete with virtually any language for speed and flexibility. BASIC has the distinct advantage of being the most portable language between differing systems. The author's favorite is Microsoft's QuickBasic.
For other reasons, Math and Computer Departments have taken to instructing PASCAL, FORTRAN, FORTH, LISP, or C, to mention only a few. These are said to be more structured. Be wary, however. It is not necessary to write unstructured code in BASIC, and code that is written with these other languages, may not transfer easily from one machine to another, without extensive reworking. In practice, once again, it hardly matters in an undergraduate cell biology laboratory. For programming your own code, use the language you are most familiar with.
Programs given in this manual are in the more familiar BASIC format (IBM BASICA). Since even the core BASIC instructions vary slightly between computer systems, some conversion may be necessary prior to their use.
COMMERCIAL SOFTWARE There are a number of types of programs available and useful to the cell biology laboratory
SPREAD SHEETS Without question, the single most useful program available for data collection and analysis is the spread sheet program. There are several available, each with its own merits. The leader (in sales and business use) in the PC dominated field is Lotus 1- 2-3. Others of equal or superior value are Supercalc5, Quattro, or Excel. Integrated packages (Open Access, Symphony, Enable, Framework) nearly always contain powerful spreadsheets. Several of these offer educational discounts of their purchase price.
A spreadsheet program is an electronic balance sheet divided in rows and columns. Pioneered by Visicalc, these programs may have had as much impact on computer use as the actual design of the hardware. Any data that can be tabulated in columns and rows can be added to this type of program. Functions are readily available for totals (sums), averages, means, maximum and minimum values, and full trigonmetric functions. The programs listed above also include capabilities of sorting data, searching through the data, and for automatic graphing of the data. Each allows the construction of blank masks that contain the instructions for coding input and output while allowing students ease of data entry.
Spreadsheet programs have become so powerful in their latest versions, that they can be used as word processors and for data base manipulations, although they are not very sophisticated in these functions. Many of their graph routines are as powerful as stand alone programs for graphing, and are usually easier to use. The data entered can readily be transferred between other programs, from BASIC through direct analog conversions of integrated equipment.
If you were to purchase only one software package for the cell biology laboratory, it should be a spreadsheet.
The use of a spread sheet can be demonstrated with the calculation of oxygen uptake by isolated mitochondria ( Exercise 8.7). The data are collected for fourteen readings, every 10 minutes and must then be corrected for temperature and barometric fluctuations, as well as residual activity within the isolated mitochondria. The corrected data is then graphed. Use of a computer spreadsheet in the laboratory makes this a simple task, and allows visualization of the progress of the exercise as it is happening.
| A || B || C || D || E || F || G || H || I || J || K || L || M || N | O | 1 Mitochondrial Respiration 2 Cell Biology Exercise 8.7 3 4 Flask Number 5----------------------------------------------------------------------------- 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 Time Manometer Readings 8----------------------------------------------------------------------------- 9 10 506 500 490 490 445 499 496 503 585 497 499 510 493 493 10 20 510 490 487 487 416 492 493 512 490 504 501 516 500 500 11 30 522 489 479 479 394 478 490 511 490 506 505 518 497 497 12 40 536 486 476 476 370 475 501 525 499 513 513 527 515 515 13 50 555 486 473 473 345 458 505 526 499 514 515 527 515 515 14 60 575 485 469 469 327 456 508 526 502 516 517 529 513 513 15 70 590 482 464 464 305 448 510 529 506 525 524 532 518 518 16 17 Minutes Microliters Oxygen Consumed 18 Oxygen Utilization by Mitochondria 19 20 21 Change in gas volume (Average of replicates) 22 Flask Numbers (in pairs 23 Time 1/2 3/4 5/6 7/8 9/10 11/12 13/14 24 ------------------------------------------------------------------------- 25 10 -3.0 10.0 28.0 .5 -41.0 -4.5 7.0 26 20 .0 13.0 46.0 -2.5 3.0 -8.5 .0 27 30 -5.5 21.0 64.0 -.5 2.0 -11.5 3.0 28 40 -11.0 24.0 77.5 -13.0 -6.0 -20.0 -15.0 29 50 -20.5 27.0 98.5 -15.5 -6.5 -21.0 -15.0 30 60 -30.0 31.0 108.5 -17.0 -9.0 -23.0 -13.0 31 70 -36.0 36.0 123.5 -19.5 -15.5 -28.0 -18.0 32 Paired readings, averaged, and subtracted from original 33 Values corrected for Temp/Pressure/Endogenous 34---------------------------------------------------------------------------- 35 .5 Glu.8 GluAzide DNP MalonaControl 36 Corrected for background 37 3/4 5/6 7/8 9/10 11/12 38 10 6.0 24.0 -3.5 -45.0 -8.5 39 20 13.0 46.0 -2.5 3.0 -8.5 40 30 23.5 66.5 2.0 4.5 -9.0 41 40 50.0 103.5 13.0 20.0 6.0 42 50 62.5 134.0 20.0 29.0 14.5 43 60 74.0 151.5 26.0 34.0 20.0 44 70 90.0 177.5 34.5 38.5 26.0
Corrected values used to plot Figure D.1

Among the best in this area, are Sigma Plot, Energraphics, Harvard Graphics and Cricket Graph. Most of these programs (except Sigma Plot) are designed for business graphics, but can be used in the cell laboratory.
These programs allow for rapid entry of data for variables and simultaneous calculation of any other parameter within an equation. TK-Solver is ideal for insertion of such things as the Nernst equation, or the Hodgkin-Huxley equation, with subsequent query of What-if questions. If you wish to attempt mathematical modeling of cAMP pulsing in D. discoideum , TK-Solver or Eureka are well worth the investment.
The leader in the business field is DB II (III and IV), but there are equal programs available for a lower cost. Among those to be considered are Q&A, Reflex, R-base and PC File. For ease of use, while retaining powerful options of data manipulation, Q&A excells. For tabular presentations of data, Reflex is the choice. For relational needs, R-base or the DB series are the programs of choice. PC File represents a good, less expensive alternative.
Data base managers are excellent means of filing references, sources and such things as equipment lists, chemical inventory, etc. They can also be used effectively for filing of nucleic acid sequences, but the data base must be created before it can be used. Whether or not to use a data base manager for this purpose depends on the availability of the data in an appropriate form for use within your program. If data base managers are used, however, a hard drive becomes nearly mandatory.
Virtually all word processors have a Search function, and this function can be used to search a code several thousand letters long for the presence say of a 10 base code. This is not recommended, however, since the process is usually slow from within a word processor, and most word processing programs have severe limitations on the length of the words searched.
Several word processor packages are available for scientific presentation, and these will make inclusion of scientific formulas and symbols easier.
Several are equipped with the ability to perform red- lining and can compare two files for any changes. This is useful if you ask for rewriting of lab reports. The computer will highlight those portions of the report which have been changed in the second version, eliminating the need to review the other sections. This feature is also useful for group reports, where several individuals may make changes in the presentation. By far the most popular word processor is Word Perfect. The author's personal choice is XyWrite III, which was used for this publication.
Closely allied with word processors are Desk Top Publishers . These programs can format both text and graphics for typesetter output, or for printing on laser printers. These programs are rarely directly useful in the undergraduate lab, but are excellent when it comes time to communicate your information to others. The use of Xerox Ventura Publisher or Aldus Pagemaker (the two representing the top of the line) is left for final publication layout. Ventura Publisher, for example, was used for the final draft of this manual.
Desk Top Publishers are mentioned in this section merely as an option. Many software updates of familiar word processors are including the capabilities of desk top publishing into their programs. For the most part, this adds needless expense to the update, and increases the learning curve significantly. More importantly, it increases the need for larger quantities of RAM and faster hardware. This adds to the cost of the system and although it may add impressive screen graphics, it rarely adds to any improved laboratory outcome.
There is a good deal of hype circling around which word processor is the best . The answer is simple. If you have a word processor, you know how to use it, and it works for you, keep it.
The author has found these programs to be of value to students in formulating the purpose of individual laboratory exercises, when linked to either reports or individual projects. The entire outline for this manual was first conceived and organized using MaxThink.
If you are heavily into writing reports and/or student papers, you may want to tie together a good outlining program with a wordprocessor and top it off with RightWriter. The latter is a grammar and context checker that is quite enlightening when applied to literary creations.
At their best, these programs can be completely interactive and can readily and accurately simulate laboratory conditions that are time or cost prohibitive. An excellent example of this is the use of computer simulation for enzyme kinetics.
These programs are so numerous and variable, that use of them is left to the instructors. The best means of examining them is attendance at national meetings where they can often be reviewed. There are also user's groups which will review programs. The only means of deciding on the purchase and use of CAI programs is to talk with those who have used them (not the people who wrote them or are selling them) and then try them yourself.
flux and Chemiosmosis
Essentially, anything which requires repetitive calculations or data sorting is material for this section.
Included in this appendix are two programs. The first (CELLM) allows the student to play the role of a cell membrane. The second, (BEER) allows rapid calculations of extinction coefficients using the Beer-Lambert law. Other programs are available from the author, but space prohibits extensive listings. For example, a QuickBasic program for interconversion of centrifuge rotors and calculations of viscosity, sedimentation coefficients and clearing constants would require 12-15 pages if typed out. Programs can become very complex over time. An example of a page flipper program (for review of photosynthesis) originally written in PC Basic and converted to QuickBasic 4.5 is longer yet. This type of program can be fun, since graphics can be included to demonstrate chlorophyll accepting light (as lightning bolts) and transferring electrons to other molecular orbits. There are several commercially available programs of this type.
10 REM BY KEN WITT TRACY HIGH SCHOOL 20 REM MODIFIED FOR BASIC-V 13 JUNE 1979 K. ANDERSON 30 REM MODIFIED FOR IBM BY SCOTT SHEKELS MARCH 3, 1986 40 REM Gustavus Adolphus College 50 REM ****************************************************** 60 REM 70 REM 80 READ H,S,K,N,C,W,P 90 DATA 6700,30,53,0,1,0,0 100 WIDTH 40:COLOR 15,1,1:KEY OFF:CLS 110 LOCATE 1,15:PRINT"WELCOME!" 120 LOCATE 5,18:PRINT"TO" 130 LOCATE 9,16:PRINT"CELLM" 140 LOCATE 11,6:PRINT"A CELL MEMBRANE SIMULATION." 150 FOR SCOTT=1 TO 2000:NEXT:CLS 160 PRINT "Do you wish to see an explanation" 170 PRINT "of this program"; 180 INPUT A$:A$=LEFT$(A$,1) 190 IF A$="Y" OR A$="y" THEN 210 200 GOTO 720 210 WIDTH 80:COLOR 15,1,1:CLS 211 PRINT "IN THIS PROGRAM YOU WILL BE ROLE PLAYING. YOU WILL ACT AS" 220 PRINT "A CELL MEMBRANE AND YOUR RESPONSIBILITY WILL BE TO MAKE" 230 PRINT "ADJUSTMENTS IN THE FOLLOWING ITEMS:" 240 PRINT "1.WATER" 250 PRINT "2.SUGAR" 260 PRINT "3.POTASSIUM IONS" 270 PRINT "4.SODIUM IONS" 280 PRINT "5.CHLORIDE IONS" 290 PRINT "6.WASTE(PRIMARILY AMMONIA COMPOUNDS)" 300 PRINT "----------------------------------------------" 310 PRINT "SAFE CONCENTRATIONS ARE AS FOLLOWS:" 320 PRINT " WATER BETWEEN 6000 AND 8000 MOLECULES" 330 PRINT " SUGAR BETWEEN 10 AND 35 MOLECULES" 340 PRINT " POTASSIUM BETWEEN 40 AND 53 IONS" 350 PRINT " SODIUM BETWEEN 0 AND 13 IONS" 360 PRINT " CHLORIDE BETWEEN 1 AND 3 IONS" 370 PRINT " WASTE BETWEEN 0 AND 10 MOLECULES" 380 PRINT"PRESS RETURN TO CONTINUE" 390 A$=INKEY$:IF A$="" THEN 390 400 CLS 410 PRINT " " 420 PRINT " " 430 PRINT "YOU WILL BE A CELL MEMBRANE OF ESCHERICHIA COLI. YOUR" 440 PRINT "CONCENTRATIONS ARE:" 450 PRINT " WATER-67% OR 6700 MOLECULES SUGAR-30 MOLECULES" 460 PRINT " POTASSIUM IONS-53 NO SODIUM OR WASTE" 470 PRINT " A TRACE OF CHLORIDE ION" 480 GOTO 1900 490 CLS:PRINT " " 500 PRINT "-------------------------------------------------------" 510 PRINT "UNDERSTAND, AS YOU DO ANY OF THE FOLLOWING, ENERGY WILL" 520 PRINT "BE USED UP IN THE AMOUNTS SHOWN." 530 PRINT " GET RID OF WASTE-4 MOLECULES OF SUGAR" 540 PRINT "--------------------------------------------------------" 550 PRINT "CHANGES IN THE CELL DUE TO OSMOSIS AND DIFFUSION TAKE" 560 PRINT "PLACE AUTOMATICALLY. OTHER ENERGY FOR OTHER FUNCTIONS" 570 PRINT "OF THE CELL, SUCH AS PREPARATION FOR REPRODUCTION ALSO" 580 PRINT "DEPRICIATE AUTOMATICALLY." 590 PRINT "WASTE BUILD UP FROM SUCH ENERGY ALSO TAKES PLACE." 600 PRINT " " 610 PRINT "PRETEND YOU ARE NOW PLACED INTO A SOLUTION WHICH HAS THE" 620 PRINT "FOLLOWING CONSTANT CONCENTRATIONS:" 630 PRINT " WATER-87% SUGAR-10% SODIUM-TRACE" 640 PRINT " POTASSIUM-TRACE CHLORIDE-TRACE" 650 PRINT "*********************************************************" 660 PRINT "THE CELL BEGINS TO BURN SUGAR FOR ENERGY. DIFUSION AND" 670 PRINT "OSMOTIC POTENTIALS GO INTO EFFECT. YOU ARE NOW READY TO" 680 PRINT "ATTEMPT TO KEEP THIS CELL ALIVE!" 690 PRINT "=================================" 700 PRINT:PRINT"PRESS RETURN TO CONTINUE"; 710 A$=INKEY$:IF A$="" THEN 710 711 WIDTH 40:CLS:COLOR 15,1,1 720 J=0 730 LET P=P+1 740 IF P=13 THEN 1810 750 PRINT:PRINT 760 PRINT" 1. water" 770 PRINT" 2. sugar" 780 PRINT" 3. potassium ions" 790 PRINT" 4. sodium ions" 800 PRINT" 5. chloride ions" 810 PRINT" 6. waste" 820 PRINT" (primarily ammonia compounds)" 830 PRINT "Choose the number of the item "; 840 PRINT"which you wish to change." 850 INPUT X 860 LET H=H+400 870 LET S=S-4 880 LET K=K-2 890 LET N=N+2 900 LET W=W+4 910 IF X=1 THEN 970 920 IF X=2 THEN 1210 930 IF X=3 THEN 1310 940 IF X=4 THEN 1380 950 IF X=5 THEN 1480 960 IF X=6 THEN 1510 970 PRINT "What is the number of water molecules" 980 PRINT "that you want removed"; 990 INPUT A 1000 IF AH THEN 1030 1010 PRINT "YOU DONT HAVE THAT MANY!" 1020 GOTO 970 1030 LET H=H-A 1040 PRINT "Energy is used here to get rid of water" 1050 LET S=S-4 1060 PRINT " " 1070 PRINT "PRESENT CONDITIONS ARE AS FOLLOWS:" 1080 PRINT 1090 PRINT "POTASSIUM IONS--";K,"WASTE MOLECULES--";W 1100 PRINT "SODIUM INS--";N,"WATER MOLECULES--";H 1110 PRINT "CHLORIDE IONS--";C,"SUGAR MOLECULES--";S 1120 PRINT " " 1130 IF Hp THEN 1610 1140 IF H8000 THEN 1610 1150 IF S THEN 1640 1160 IF S35 THEN 1640 1170 IF K( THEN 1690 1180 IF K60 THEN 1690 1190 IF W10 THEN 1730 1200 GOTO 720 1210 PRINT "How many sugar molecules do you want" 1220 INPUT B 1230 IF B THEN 1270 1240 PRINT "The solution cannot offer you that many" 1250 PRINT "at once!" 1260 GOTO 1210 1270 LET S=S+B 1280 PRINT "Energy is needed for pinocytosis!" 1290 LET S=S-3 1300 GOTO 1060 1310 PRINT"Potassium ions are regulated by active" 1320 PRINT"transport. More specifically they are" 1330 PRINT"regulated by the sodium pump, which " 1340 PRINT"is for every sodium ion pumped out, one" 1350 PRINT"potassium ion is gained on the inside" 1360 PRINT"of the membrane." 1370 GOTO 730 1380 PRINT "How many sodium ions do you want removed" 1390 INPUT D 1400 IF D 20 THEN 1430 1410 PRINT "YOU DO NOT HAVE THAT MANY!!!" 1420 GOTO 1380 1430 LET N=N-D 1440 LET K=K+D 1450 PRINT "Energy is needed for active transport!!" 1460 LET S=S-2 1470 GOTO 1060 1480 PRINT "YOU HAVE LITTLE OR NO CONTROL OR NEED TO" 1490 PRINT "CHANGE THE CHLORIDE ION CONCENTRATION!!" 1500 GOTO 730 1510 PRINT "How many waste molecules do you want to" 1520 PRINT "get rid of" 1530 INPUT E 1540 IF EW-3 THEN 1570 1550 PRINT "YOU DO NOT HAVE THAT MANY TO GET RID OF!" 1560 GOTO 1510 1570 LET W=W-E 1580 PRINT "Energy is needed to get rid of waste!" 1590 LET S=S-4 1600 GOTO 1060 1610 PRINT "***CRISIS***" 1615 PRINT "ADJUST WATER CONCENTRATION IMMEDIATELY!!" 1620 LET J=J+1 1630 GOTO 1760 1640 PRINT "***CRISIS***" 1645 PRINT "ADJUST SUGAR CONCENTRATION IMMEDIATELY!!" 1650 IF S0 THEN 1670 1660 PRINT "YOU ARE BURNING PROTOPLASM!" 1670 LET J=J+1 1680 GOTO 1760 1690 PRINT "***CRISIS***" 1695 PRINT "ADJUST POTASSIUM ION CONCENTRATION " 1700 PRINT " IMMEDIATELY!!" 1710 LET J=J+1 1720 GOTO 1760 1730 PRINT "***CRISIS***" 1735 PRINT "ADJUST WASTE CONCENTRATION IMMEDIATELY!!" 1740 LET J=J+1 1750 PRINT 1760 IF J THEN 730 1770 PRINT "YOU DID NOT FUNCTION WELL AS A" 1780 PRINT"CELL MEMBRANE." 1790 PRINT "***YOUR CELL IS NOW DEAD********" 1800 GOTO 1890 1810 WIDTH 80:CLS:PRINT "***VERY GOOD*** " 1815 PRINT "YOU HAVE MAINTAINED THE CELL LONG" 1820 PRINT "ENOUGH TO REACH MATURITY. THE CELL IS NOW ABOUT TO" 1830 PRINT "REPRODUCE. DO YOU WISH TO TRY TO KEEP ONE OF THE " 1840 PRINT "DAUGHTER CELLS ALIVE " 1850 INPUT A$:A$=LEFT$(A$,1):IF A$="y" OR A$="Y" THEN 1970 1860 LET P=0 1870 REM 1880 REM SUBROUTINES 1890 END 1900 PRINT "DO YOU WISH TO SEE AN EXPLANATION OF CONCENTRATIONS" 1910 PRINT "AND RULES"; 1920 INPUT A$:A$=LEFT$(A$,1):IF A$="Y" OR A$="y" THEN 490 1930 IF A$="n" OR A$="N" THEN 1950 1940 END 1950 WIDTH 40:COLOR 15,1,1:CLS 1960 GOTO 720 1970 WIDTH 40:CLS:P=0:GOTO 720BEER (BASIC program for Beer-Lambert Law)
10 REM************************************************************
20 REM FILE NAME: BEER.BAS W.Heidcamp
30 REM************************************************************
40 REM
50 REM ** R1$-R4$=RESPONSES TO INPUT PARAMETERS
60 REM ** M=SLOPE OF REGRESSION = ABSORPTIVITY B=Y INTERCEPT
70 REM ** N = NUMBER OF DATA POINTS IN STANDARD CURVE
80 REM ** SX,SY,SX2,SXY ARE SUMS OF XY ,X^2,X*Y RESPECTIVELY
90 REM ** DIMENSIONED VARIABLES X = CONCENTRATION, Y = ABSORBANCE
100 REM*************************************************************
110 REM
120 DIM X(20), Y(20), YT(20), X2(20), XY(20), Y2(20)
130 REM
140 KEY OFF: SCREEN 0:WIDTH 80:COLOR 14,1,1:CLS:LOCATE 1,1
150 PRINT "THIS PROGRAM WILL COMPUTE THE EXTINCTIOIN COEFFICIENT"
160 PRINT "AND USE THIS # TO COMPUTE THE CONCENTRATIONS OF UNKNOWNS"
170 PRINT:PRINT
180 PRINT "CALCULATIONS ARE BASED ON BEER-LAMBERT LAW A=ecl"
190 PRINT " WHERE A = ABSORBANCE"
200 PRINT " e = ABSORBTIVITY (EXTINCTION COEFFICIENT)
210 PRINT " c = CONCENTRATION
220 PRINT " l = LENGTH OF OPTICAL PATH (1 cm FOR SPEC 20)
230 PRINT " ":LOCATE 19,1
240 REM CALCULATE ABSORBTIVITY FOR STANDARD
250 CLS:LOCATE 1,1
260 PRINT "IT WILL FIRST BE NECESSARY FOR YOU TO ENTER YOUR DATA"
270 PRINT "FROM THE STANDARDIZATION."
280 PRINT "HOW MANY DATA POINTS IN YOUR STANDARD ";
290 INPUT N
300 PRINT:PRINT "IS YOUR DATA TRANSMITTANCE (T) OR ABSORBANCE (A)";
310 INPUT R2$
320 IF R2$ = "A" THEN 430:IF R2$ = "a" THEN 430
330 IF R2$ "T" THEN 300
340 PRINT "PLEASE ENTER THE DATA IN THE FOLLOWING ORDER:"
350 PRINT "CONCENTRATION, TRANSMITTANCE"
360 PRINT "INCLUDE A COMMA BETWEEN THE TWO VALUES!":PRINT
370 FOR I = 1 TO N
380 PRINT "DATA POINT NUMBER ";I;" ";
390 INPUT X(I),YT(I)
400 Y(I) = LOG(100/YT(I))/LOG(10)
410 NEXT I
420 GOTO 490
430 PRINT "CONCENTRATION, ABSORBANCE"
440 PRINT "BE SURE TO SEPARATE THE TWO VALUES BY A COMMA!"
450 FOR I = 1 TO N
460 PRINT "DATA POINT NUMBER ";I;" ";
470 INPUT X(I),Y(I)
480 NEXT I
490 REM ************************* PRINT DATA AS ABSORBANCE
500 CLS
510 PRINT:PRINT "YOUR DATA (AS ENTERED OR CONVERTED)":PRINT
520 PRINT "CONCENTRATION" TAB(30) "ABSORBANCE"
530 PRINT "-------------" TAB(30) "----------"
540 FOR I = 1 TO N
550 PRINT USING "### ";X(I);:PRINT TAB(34);:PRINT USING "#.###";Y(I)
560 NEXT I
570 PRINT
580 REM *************** CALCULATE THE LINEAR REGRESSION FOR THE DATA
590 SX=0: SY=0: SX2=0: SXY=0
600 SY2=0
610 FOR I=1 TO N
620 SX=SX+X(I)
630 SY=SY+Y(I)
640 X2(I)=X(I)^2
650 SX2=SX2+X2(I)
660 Y2(I)=Y(I)^2
670 SY2=SY2 + Y2(I)
680 XY(I)=X(I)*Y(I)
690 SXY=SXY+XY(I)
700 NEXT I
710 REM **************************** CALCULATE THE SLOPE OF THE LINE M
720 M=(SXY-(SX*SY/N))/(SX2-(SX^2/N))
730 REM **************************** CALCULATE THE Y INTERCEPT
"B"
740 B=(SY-(M*SX))/N
750 REM **************************** CALCULATE S.DEVIATIONS FOR X AND Y
760 SDX = SQR((SX2-(SX^2/N))/(N-1))
770 SDY = SQR((SY2-(SY^2/N))/(N-1))
780 REM ******************* CALCULATE THE CORRELATION COEFFICIENT "CC"
790 CC = M*SDX/SDY
800 PRINT "YOUR DATA FITS THE GENERAL EQUATION OF Y=MX + B, WHERE"
810 PRINT "M AND B ARE THE SLOPE AND Y INTERCEPT RESPECTIVELY."
820 PRINT "Y = ";:PRINT USING "#.####";M;
825 PRINT " X ";:PRINT USING "+##.####";B
830 PRINT:PRINT "THE CORRELATION COEFFICIENT, R = ";CC
840 PRINT
843 PRINT "THE SLOPE M (";:COLOR 15,1,1:PRINT USING "#.#####";M;:COLOR 14,1,1
847 PRINT ") IS THE VALUE FOR THE EXTINCTION COEFFICIENT"
850 PRINT
853 PRINT "PRESS SHIFT/PrtSc FOR A PRINTOUT OF THIS INFORMATION":PRINT
860 END