load omahacorn.txt ??? Error using ==> load Unable to read file omahacorn.txt: file does not exist. pwd ans = E:\programs\matlabR12\work cd C:\WINNT\Profiles\geology\Desktop\ load omahacorn.txt whos Name Size Bytes Class ans 1x26 52 char array omahacorn 52x20 8320 double array Grand total is 1066 elements using 8372 bytes omahacorn(1:5,1:5) ans = 1.0000 NaN 3.1400 2.5900 2.3700 2.0000 NaN 3.1700 2.5900 2.3800 3.0000 2.4400 3.1000 2.6200 2.3500 4.0000 2.5000 3.1200 2.6300 2.3400 5.0000 2.5600 3.0900 2.6300 2.3400 week=omahacorn(:,1); omahacorn(:,1)=[]; whos Name Size Bytes Class ans 5x5 200 double array omahacorn 52x19 7904 double array week 52x1 416 double array Grand total is 1065 elements using 8520 bytes corn=omahacorn(:); whos Name Size Bytes Class ans 5x5 200 double array corn 988x1 7904 double array omahacorn 52x19 7904 double array week 52x1 416 double array Grand total is 2053 elements using 16424 bytes t=[0:987]/52 + 1983; whos t Name Size Bytes Class t 1x988 7904 double array Grand total is 988 elements using 7904 bytes whos week Name Size Bytes Class week 52x1 416 double array Grand total is 52 elements using 416 bytes W=week*ones(1,19); W(1:5,1:5) ans = 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 Y=ones(52,1)*[1983:2001]; whos Y Name Size Bytes Class Y 52x19 7904 double array Grand total is 988 elements using 7904 bytes Y(1:5,1:5) ans = 1983 1984 1985 1986 1987 1983 1984 1985 1986 1987 1983 1984 1985 1986 1987 1983 1984 1985 1986 1987 1983 1984 1985 1986 1987 T=(W-1)/52+Y; T(1:5,1:5) ans = 1.0e+003 * 1.9830 1.9840 1.9850 1.9860 1.9870 1.9830 1.9840 1.9850 1.9860 1.9870 1.9830 1.9840 1.9850 1.9860 1.9870 1.9831 1.9841 1.9851 1.9861 1.9871 1.9831 1.9841 1.9851 1.9861 1.9871 format long T(1:5,1:5) ans = 1.0e+003 * Columns 1 through 4 1.98300000000000 1.98400000000000 1.98500000000000 1.98600000000000 1.98301923076923 1.98401923076923 1.98501923076923 1.98601923076923 1.98303846153846 1.98403846153846 1.98503846153846 1.98603846153846 1.98305769230769 1.98405769230769 1.98505769230769 1.98605769230769 1.98307692307692 1.98407692307692 1.98507692307692 1.98607692307692 Column 5 1.98700000000000 1.98701923076923 1.98703846153846 1.98705769230769 1.98707692307692 t=T(:); whos Name Size Bytes Class T 52x19 7904 double array W 52x19 7904 double array Y 52x19 7904 double array ans 5x5 200 double array corn 988x1 7904 double array omahacorn 52x19 7904 double array t 988x1 7904 double array week 52x1 416 double array Grand total is 6005 elements using 48040 bytes save Saving to: matlab.mat clear load matlab whos Name Size Bytes Class T 52x19 7904 double array W 52x19 7904 double array Y 52x19 7904 double array ans 5x5 200 double array corn 988x1 7904 double array omahacorn 52x19 7904 double array t 988x1 7904 double array week 52x1 416 double array Grand total is 6005 elements using 48040 bytes save omahacorn t corn clear load omahacorn whos Name Size Bytes Class corn 988x1 7904 double array t 988x1 7904 double array Grand total is 1976 elements using 15808 bytes clear t=pi t = 3.14159265358979 whos Name Size Bytes Class t 1x1 8 double array Grand total is 1 elements using 8 bytes load omahacorn whos Name Size Bytes Class corn 988x1 7904 double array t 988x1 7904 double array Grand total is 1976 elements using 15808 bytes help plot PLOT Linear plot. PLOT(X,Y) plots vector Y versus vector X. If X or Y is a matrix, then the vector is plotted versus the rows or columns of the matrix, whichever line up. If X is a scalar and Y is a vector, length(Y) disconnected points are plotted. PLOT(Y) plots the columns of Y versus their index. If Y is complex, PLOT(Y) is equivalent to PLOT(real(Y),imag(Y)). In all other uses of PLOT, the imaginary part is ignored. Various line types, plot symbols and colors may be obtained with PLOT(X,Y,S) where S is a character string made from one element from any or all the following 3 columns: y yellow . point - solid m magenta o circle : dotted c cyan x x-mark -. dashdot r red + plus -- dashed g green * star b blue s square w white d diamond k black v triangle (down) ^ triangle (up) < triangle (left) > triangle (right) p pentagram h hexagram For example, PLOT(X,Y,'c+:') plots a cyan dotted line with a plus at each data point; PLOT(X,Y,'bd') plots blue diamond at each data point but does not draw any line. PLOT(X1,Y1,S1,X2,Y2,S2,X3,Y3,S3,...) combines the plots defined by the (X,Y,S) triples, where the X's and Y's are vectors or matrices and the S's are strings. For example, PLOT(X,Y,'y-',X,Y,'go') plots the data twice, with a solid yellow line interpolating green circles at the data points. The PLOT command, if no color is specified, makes automatic use of the colors specified by the axes ColorOrder property. The default ColorOrder is listed in the table above for color systems where the default is yellow for one line, and for multiple lines, to cycle through the first six colors in the table. For monochrome systems, PLOT cycles over the axes LineStyleOrder property. PLOT returns a column vector of handles to LINE objects, one handle per line. The X,Y pairs, or X,Y,S triples, can be followed by parameter/value pairs to specify additional properties of the lines. See also SEMILOGX, SEMILOGY, LOGLOG, GRID, CLF, CLC, TITLE, XLABEL, YLABEL, AXIS, AXES, HOLD, COLORDEF, LEGEND, SUBPLOT, and STEM. Overloaded methods help idmodel/plot.m help iddata/plot.m help ntree/plot.m help dtree/plot.m help wvtree/plot.m help rwvtree/plot.m help edwttree/plot.m plot(t,corn) diary off