octave:2> S.a=1 S = scalar structure containing the fields: a = 1 octave:3> S.b=[1,2] S = scalar structure containing the fields: a = 1 b = 1 2 octave:4> S.c='ciao' S = scalar structure containing the fields: a = 1 b = 1 2 c = ciao octave:5> S S = scalar structure containing the fields: a = 1 b = 1 2 c = ciao octave:6> S.c ans = ciao octave:7> x=rand(1,4); octave:8> y=rand(1,4); octave:9> xbar = rand(1,8); octave:10> ybar = spline(x,y,xbar) ybar = Columns 1 through 7: 15.09348 -5.09355 -0.70184 -6.01014 -6.04478 -4.91065 14.76174 Column 8: -6.06903 octave:11> ybar = spline(x,y,xbar) ybar = 15.09348 -5.09355 -0.70184 -6.01014 -6.04478 -4.91065 14.76174 -6.06903 octave:12> xx=linspace(0,1,101); octave:13> yy = spline(x,y,xx); octave:14> plot(xx,yy) octave:15> plot(xx,yy,x,y,'o') octave:16> pp = spline(x,y) pp = scalar structure containing the fields: form = pp breaks = 0.24455 0.80375 0.84964 0.92174 coefs = -205.10022 246.89526 -73.79953 0.45031 -205.10022 -97.17496 9.92262 0.52208 -205.10022 -125.41330 -0.29275 0.75296 pieces = 3 order = 4 dim = 1 octave:17> yy=ppval(pp,xx); octave:18> plot(xx,yy) octave:19> xxx=linspace(0,1,11); octave:20> yyy=ppval(pp,xxx); octave:21> plot(xxx,yyy) octave:22> x x = 0.80375 0.84964 0.24455 0.92174 octave:23> pp.coefs ans = -205.10022 246.89526 -73.79953 0.45031 -205.10022 -97.17496 9.92262 0.52208 -205.10022 -125.41330 -0.29275 0.75296 octave:24> A=rand(3,11); octave:25> mkpp(x,A) ans = scalar structure containing the fields: form = pp breaks = 0.80375 0.84964 0.24455 0.92174 coefs = Columns 1 through 9: 0.071541 0.818493 0.421372 0.659977 0.870881 0.857732 0.618958 0.930427 0.042525 0.140520 0.229240 0.789858 0.673841 0.086885 0.078851 0.553665 0.334297 0.854978 0.660602 0.982321 0.327631 0.032888 0.660946 0.960512 0.472279 0.319804 0.486371 Columns 10 and 11: 0.832069 0.493874 0.961204 0.922823 0.315312 0.377799 pieces = 3 order = 11 dim = 1 octave:26> edit spline octave:27> help spline 'spline' is a function from the file /usr/share/octave/3.8.1/m/polynomial/spline.m -- Function File: PP = spline (X, Y) -- Function File: YI = spline (X, Y, XI) Return the cubic spline interpolant of points X and Y. When called with two arguments, return the piecewise polynomial PP that may be used with 'ppval' to evaluate the polynomial at specific points. When called with a third input argument, 'spline' evaluates the spline at the points XI. The third calling form 'spline (X, Y, XI)' is equivalent to 'ppval (spline (X, Y), XI)'. The variable X must be a vector of length N. Y can be either a vector or array. If Y is a vector it must have a length of either N or 'N + 2'. If the length of Y is N, then the "not-a-knot" end condition is used. If the length of Y is 'N + 2', then the first and last values of the vector Y are the values of the first derivative of the cubic spline at the endpoints. If Y is an array, then the size of Y must have the form '[S1, S2, ..., SK, N]' or '[S1, S2, ..., SK, N + 2]'. The array is reshaped internally to a matrix where the leading dimension is given by 'S1 * S2 * ... * SK' and each row of this matrix is then treated separately. Note that this is exactly opposite to 'interp1' but is done for MATLAB compatibility. See also: pchip, ppval, mkpp, unmkpp. Additional help for built-in functions and operators is available in the online version of the manual. Use the command 'doc ' to search the manual index. Help and information about Octave is also available on the WWW at http://www.octave.org and via the help@octave.org mailing list. octave:28> x x = 0.80375 0.84964 0.24455 0.92174 octave:29> yy=spline(x,[0,y,0],xx); octave:30> plot(xx,yy) octave:31> y y = 0.5220776 0.7529648 0.4503130 0.0029379 octave:32> xx xx = Columns 1 through 10: 0.00000 0.01000 0.02000 0.03000 0.04000 0.05000 0.06000 0.07000 0.08000 0.09000 Columns 11 through 20: 0.10000 0.11000 0.12000 0.13000 0.14000 0.15000 0.16000 0.17000 0.18000 0.19000 Columns 21 through 30: 0.20000 0.21000 0.22000 0.23000 0.24000 0.25000 0.26000 0.27000 0.28000 0.29000 Columns 31 through 40: 0.30000 0.31000 0.32000 0.33000 0.34000 0.35000 0.36000 0.37000 0.38000 0.39000 Columns 41 through 50: 0.40000 0.41000 0.42000 0.43000 0.44000 0.45000 0.46000 0.47000 0.48000 0.49000 Columns 51 through 60: 0.50000 0.51000 0.52000 0.53000 0.54000 0.55000 0.56000 0.57000 0.58000 0.59000 Columns 61 through 70: 0.60000 0.61000 0.62000 0.63000 0.64000 0.65000 0.66000 0.67000 0.68000 0.69000 Columns 71 through 80: 0.70000 0.71000 0.72000 0.73000 0.74000 0.75000 0.76000 0.77000 0.78000 0.79000 Columns 81 through 90: 0.80000 0.81000 0.82000 0.83000 0.84000 0.85000 0.86000 0.87000 0.88000 0.89000 Columns 91 through 100: 0.90000 0.91000 0.92000 0.93000 0.94000 0.95000 0.96000 0.97000 0.98000 0.99000 Column 101: 1.00000 octave:33> x x = 0.80375 0.84964 0.24455 0.92174 octave:34> xx xx = Columns 1 through 10: 0.00000 0.01000 0.02000 0.03000 0.04000 0.05000 0.06000 0.07000 0.08000 0.09000 Columns 11 through 20: 0.10000 0.11000 0.12000 0.13000 0.14000 0.15000 0.16000 0.17000 0.18000 0.19000 Columns 21 through 30: 0.20000 0.21000 0.22000 0.23000 0.24000 0.25000 0.26000 0.27000 0.28000 0.29000 Columns 31 through 40: 0.30000 0.31000 0.32000 0.33000 0.34000 0.35000 0.36000 0.37000 0.38000 0.39000 Columns 41 through 50: 0.40000 0.41000 0.42000 0.43000 0.44000 0.45000 0.46000 0.47000 0.48000 0.49000 Columns 51 through 60: 0.50000 0.51000 0.52000 0.53000 0.54000 0.55000 0.56000 0.57000 0.58000 0.59000 Columns 61 through 70: 0.60000 0.61000 0.62000 0.63000 0.64000 0.65000 0.66000 0.67000 0.68000 0.69000 Columns 71 through 80: 0.70000 0.71000 0.72000 0.73000 0.74000 0.75000 0.76000 0.77000 0.78000 0.79000 Columns 81 through 90: 0.80000 0.81000 0.82000 0.83000 0.84000 0.85000 0.86000 0.87000 0.88000 0.89000 Columns 91 through 100: 0.90000 0.91000 0.92000 0.93000 0.94000 0.95000 0.96000 0.97000 0.98000 0.99000 Column 101: 1.00000 octave:35> xx=linspace(min(x),max(x),101); octave:36> yy=spline(x,[0,y,0],xx); octave:37> plot(xx,yy) octave:38> pp=spline(x,[0,y,0]); octave:39> pp pp = scalar structure containing the fields: form = pp breaks = 0.24455 0.80375 0.84964 0.92174 coefs = 2.7710e+01 -1.5266e+01 2.7756e-16 4.5031e-01 -2.5274e+03 3.1220e+01 8.9215e+00 5.2208e-01 3.1969e+03 -3.1676e+02 -4.1830e+00 7.5296e-01 pieces = 3 order = 4 dim = 1 octave:40> xx=linspace(min(x),max(x),1001); octave:41> yy=spline(x,[0,y,0],xx); octave:42> plot(xx,yy) octave:43> spdiags([[1;2;3],[4;5;6],[7;8;9]],-1:1,3,3) ans = Compressed Column Sparse (rows = 3, cols = 3, nnz = 7 [78%]) (1, 1) -> 4 (2, 1) -> 1 (1, 2) -> 8 (2, 2) -> 5 (3, 2) -> 2 (2, 3) -> 9 (3, 3) -> 6 octave:44> full(spdiags([[1;2;3],[4;5;6],[7;8;9]],-1:1,3,3)) ans = 4 8 0 1 5 9 0 2 6 octave:45> x=rand(1,4) x = 0.95842 0.22183 0.31872 0.90649 octave:46> y=rand(1,4) y = 0.92312 0.42906 0.25244 0.44279 octave:47> spline(x,y) ans = scalar structure containing the fields: form = pp breaks = 0.22183 0.31872 0.90649 0.95842 coefs = 14.68481 -8.34132 -1.15260 0.42906 14.68481 -4.07294 -2.35540 0.25244 14.68481 21.82088 8.07629 0.44279 pieces = 3 order = 4 dim = 1 octave:48> spline_notaknot(x,y) ans = scalar structure containing the fields: form = pp breaks = 0.22183 0.31872 0.90649 0.95842 coefs = 14.68481 -8.34132 -1.15260 0.42906 14.68481 -4.07294 -2.35540 0.25244 14.68481 21.82088 8.07629 0.44279 pieces = 3 order = 4 dim = 1 octave:49> spline([0,1],[3,4]) ans = scalar structure containing the fields: form = pp breaks = 0 1 coefs = 1 3 pieces = 1 order = 2 dim = 1 octave:50> spline_notaknot([0,1],[3,4]) error: spline_notaknot: subscript indices must be either positive integers less than 2^31 or logicals error: called from: error: /home/accounts/personale/clrmrc90/aa1718/calcolo_numerico2/spline_notaknot.m at line 12, column 4 octave:50> t = linspace(0,1,101); octave:51> i = 2; octave:52> n = 2; octave:53> plot(t,Bern(i,n,t),'*',t,nchoosek(n,i-1)*t.^(i-1).*(1-t).^(n-i+1)) octave:54> nchoosek (4,3) ans = 4 octave:55> nchoosek (4,2) ans = 6 octave:56> nchoosek (10,7) ans = 120 octave:57> nchoosek (1000,999) ans = 1000 octave:58> nchoosek (1000,998) ans = 499500 octave:59> nchoosek (1000,00) ans = 1 octave:60> nchoosek (1000,900) warning: nchoosek ans = 6.3851e+139 octave:61> nchoosek (1000,800) warning: nchoosek ans = 6.6172e+215 octave:62> clear all octave:63> y{1}=rand(2) y = { [1,1] = 0.075768 0.347196 0.197408 0.205435 } octave:64> y{2}=rand(2) y = { [1,1] = 0.075768 0.347196 0.197408 0.205435 [1,2] = 0.881889 0.495028 0.472424 0.064581 } octave:65> y y = { [1,1] = 0.075768 0.347196 0.197408 0.205435 [1,2] = 0.881889 0.495028 0.472424 0.064581 } octave:66> y{1} ans = 0.075768 0.347196 0.197408 0.205435 octave:67> y{2} ans = 0.881889 0.495028 0.472424 0.064581 octave:68> y{3}=3 y = { [1,1] = 0.075768 0.347196 0.197408 0.205435 [1,2] = 0.881889 0.495028 0.472424 0.064581 [1,3] = 3 } octave:69> y{4}='ciao' y = { [1,1] = 0.075768 0.347196 0.197408 0.205435 [1,2] = 0.881889 0.495028 0.472424 0.064581 [1,3] = 3 [1,4] = ciao } octave:70> y{1} ans = 0.075768 0.347196 0.197408 0.205435 octave:71> b=rand(2,4) b = 0.115572 0.255634 0.093553 0.934372 0.928644 0.421182 0.579374 0.801659 octave:72> n=3 n = 3 octave:73> t=linspace(0,1,6); octave:74> y = reshape (repmat (b, length (t), 1), d, length (t) * (n + 1)) error: 'd' undefined near line 1 column 41 error: evaluating argument list element number 2 octave:74> d=2 d = 2 octave:75> y = reshape (repmat (b, length (t), 1), d, length (t) * (n + 1)) y = Columns 1 through 9: 0.115572 0.115572 0.115572 0.115572 0.115572 0.115572 0.255634 0.255634 0.255634 0.928644 0.928644 0.928644 0.928644 0.928644 0.928644 0.421182 0.421182 0.421182 Columns 10 through 18: 0.255634 0.255634 0.255634 0.093553 0.093553 0.093553 0.093553 0.093553 0.093553 0.421182 0.421182 0.421182 0.579374 0.579374 0.579374 0.579374 0.579374 0.579374 Columns 19 through 24: 0.934372 0.934372 0.934372 0.934372 0.934372 0.934372 0.801659 0.801659 0.801659 0.801659 0.801659 0.801659 octave:76> y = mat2cell (y, d, ones (1, n + 1) * length (t)) y = { [1,1] = 0.11557 0.11557 0.11557 0.11557 0.11557 0.11557 0.92864 0.92864 0.92864 0.92864 0.92864 0.92864 [1,2] = 0.25563 0.25563 0.25563 0.25563 0.25563 0.25563 0.42118 0.42118 0.42118 0.42118 0.42118 0.42118 [1,3] = 0.093553 0.093553 0.093553 0.093553 0.093553 0.093553 0.579374 0.579374 0.579374 0.579374 0.579374 0.579374 [1,4] = 0.93437 0.93437 0.93437 0.93437 0.93437 0.93437 0.80166 0.80166 0.80166 0.80166 0.80166 0.80166 } octave:77> y{1} ans = 0.11557 0.11557 0.11557 0.11557 0.11557 0.11557 0.92864 0.92864 0.92864 0.92864 0.92864 0.92864 octave:78> y{2} ans = 0.25563 0.25563 0.25563 0.25563 0.25563 0.25563 0.42118 0.42118 0.42118 0.42118 0.42118 0.42118 octave:79> y{3} ans = 0.093553 0.093553 0.093553 0.093553 0.093553 0.093553 0.579374 0.579374 0.579374 0.579374 0.579374 0.579374 octave:80> y{4} ans = 0.93437 0.93437 0.93437 0.93437 0.93437 0.93437 0.80166 0.80166 0.80166 0.80166 0.80166 0.80166 octave:81> t = linspace(0,1,101); octave:82> n = 4; octave:83> b = rand(2,n+1); octave:84> y = decasteljau(b,t); octave:85> y y = { [1,1] = Columns 1 through 10: 0.92865 0.91763 0.90692 0.89650 0.88637 0.87650 0.86688 0.85749 0.84833 0.83937 0.57229 0.58081 0.58881 0.59632 0.60332 0.60984 0.61586 0.62140 0.62647 0.63106 Columns 11 through 20: 0.83061 0.82203 0.81362 0.80536 0.79726 0.78929 0.78146 0.77374 0.76613 0.75862 0.63519 0.63885 0.64206 0.64483 0.64715 0.64904 0.65051 0.65155 0.65219 0.65242 Columns 21 through 30: 0.75121 0.74389 0.73665 0.72949 0.72240 0.71537 0.70841 0.70150 0.69465 0.68786 0.65226 0.65172 0.65079 0.64950 0.64786 0.64586 0.64352 0.64086 0.63788 0.63459 Columns 31 through 40: 0.68111 0.67442 0.66777 0.66118 0.65463 0.64813 0.64169 0.63529 0.62896 0.62268 0.63100 0.62713 0.62299 0.61858 0.61392 0.60902 0.60390 0.59856 0.59302 0.58729 Columns 41 through 50: 0.61646 0.61031 0.60424 0.59824 0.59232 0.58649 0.58076 0.57512 0.56961 0.56421 0.58139 0.57533 0.56912 0.56278 0.55632 0.54975 0.54309 0.53637 0.52958 0.52275 Columns 51 through 60: 0.55893 0.55380 0.54882 0.54399 0.53934 0.53487 0.53059 0.52652 0.52268 0.51906 0.51589 0.50902 0.50215 0.49531 0.48850 0.48175 0.47507 0.46848 0.46200 0.45565 Columns 61 through 70: 0.51570 0.51261 0.50979 0.50727 0.50507 0.50320 0.50167 0.50052 0.49975 0.49939 0.44944 0.44339 0.43753 0.43186 0.42642 0.42121 0.41627 0.41160 0.40724 0.40319 Columns 71 through 80: 0.49945 0.49997 0.50095 0.50242 0.50440 0.50692 0.51000 0.51366 0.51793 0.52283 0.39949 0.39614 0.39319 0.39063 0.38850 0.38683 0.38562 0.38491 0.38471 0.38505 Columns 81 through 90: 0.52839 0.53463 0.54159 0.54928 0.55774 0.56699 0.57707 0.58800 0.59981 0.61254 0.38596 0.38745 0.38955 0.39229 0.39568 0.39976 0.40454 0.41006 0.41634 0.42339 Columns 91 through 100: 0.62621 0.64086 0.65651 0.67321 0.69099 0.70987 0.72989 0.75110 0.77351 0.79718 0.43126 0.43997 0.44953 0.45999 0.47135 0.48366 0.49694 0.51122 0.52652 0.54287 Column 101: 0.82214 0.56031 [1,2] = Columns 1 through 10: 0.64900 0.64874 0.64821 0.64742 0.64639 0.64512 0.64362 0.64190 0.63998 0.63785 0.79149 0.78523 0.77881 0.77225 0.76555 0.75872 0.75176 0.74468 0.73749 0.73020 Columns 11 through 20: 0.63553 0.63303 0.63036 0.62753 0.62454 0.62141 0.61814 0.61475 0.61124 0.60763 0.72281 0.71533 0.70777 0.70013 0.69243 0.68466 0.67684 0.66898 0.66107 0.65313 Columns 21 through 30: 0.60392 0.60012 0.59624 0.59229 0.58829 0.58423 0.58013 0.57600 0.57185 0.56769 0.64517 0.63719 0.62919 0.62120 0.61321 0.60522 0.59726 0.58932 0.58141 0.57354 Columns 31 through 40: 0.56352 0.55936 0.55522 0.55109 0.54701 0.54296 0.53897 0.53504 0.53119 0.52741 0.56572 0.55795 0.55025 0.54261 0.53504 0.52756 0.52016 0.51287 0.50567 0.49859 Columns 41 through 50: 0.52372 0.52014 0.51666 0.51330 0.51007 0.50698 0.50403 0.50124 0.49861 0.49616 0.49163 0.48479 0.47808 0.47151 0.46509 0.45882 0.45272 0.44678 0.44101 0.43543 Columns 51 through 60: 0.49389 0.49181 0.48994 0.48828 0.48684 0.48564 0.48467 0.48395 0.48349 0.48330 0.43004 0.42485 0.41986 0.41508 0.41051 0.40618 0.40207 0.39821 0.39459 0.39123 Columns 61 through 70: 0.48339 0.48376 0.48443 0.48541 0.48670 0.48832 0.49027 0.49256 0.49521 0.49821 0.38812 0.38529 0.38273 0.38046 0.37847 0.37678 0.37539 0.37432 0.37356 0.37313 Columns 71 through 80: 0.50159 0.50535 0.50950 0.51405 0.51901 0.52439 0.53019 0.53643 0.54312 0.55026 0.37303 0.37328 0.37387 0.37481 0.37611 0.37779 0.37984 0.38227 0.38509 0.38831 Columns 81 through 90: 0.55787 0.56595 0.57452 0.58358 0.59314 0.60322 0.61381 0.62494 0.63661 0.64882 0.39193 0.39596 0.40042 0.40530 0.41061 0.41636 0.42256 0.42921 0.43632 0.44391 Columns 91 through 100: 0.66160 0.67494 0.68886 0.70337 0.71847 0.73418 0.75050 0.76745 0.78503 0.80326 0.45197 0.46051 0.46954 0.47907 0.48911 0.49965 0.51072 0.52231 0.53443 0.54710 Column 101: 0.82214 0.56031 [1,3] = Columns 1 through 10: 0.64476 0.63562 0.62669 0.61798 0.60950 0.60123 0.59319 0.58537 0.57776 0.57038 0.58546 0.57606 0.56684 0.55781 0.54896 0.54030 0.53182 0.52353 0.51542 0.50749 Columns 11 through 20: 0.56322 0.55628 0.54956 0.54306 0.53678 0.53072 0.52489 0.51927 0.51387 0.50870 0.49976 0.49220 0.48483 0.47765 0.47065 0.46384 0.45721 0.45076 0.44450 0.43843 Columns 21 through 30: 0.50374 0.49901 0.49449 0.49020 0.48613 0.48227 0.47864 0.47523 0.47204 0.46907 0.43254 0.42683 0.42131 0.41598 0.41083 0.40586 0.40108 0.39648 0.39207 0.38785 Columns 31 through 40: 0.46632 0.46379 0.46149 0.45940 0.45753 0.45589 0.45446 0.45326 0.45227 0.45151 0.38381 0.37995 0.37628 0.37279 0.36949 0.36637 0.36344 0.36069 0.35813 0.35575 Columns 41 through 50: 0.45097 0.45065 0.45054 0.45066 0.45100 0.45156 0.45234 0.45335 0.45457 0.45601 0.35356 0.35155 0.34973 0.34809 0.34664 0.34537 0.34429 0.34339 0.34267 0.34215 Columns 51 through 60: 0.45767 0.45956 0.46166 0.46399 0.46653 0.46930 0.47229 0.47549 0.47892 0.48257 0.34180 0.34164 0.34167 0.34188 0.34227 0.34285 0.34362 0.34457 0.34570 0.34702 Columns 61 through 70: 0.48644 0.49053 0.49484 0.49937 0.50413 0.50910 0.51429 0.51971 0.52534 0.53120 0.34853 0.35022 0.35209 0.35415 0.35640 0.35883 0.36144 0.36424 0.36722 0.37039 Columns 71 through 80: 0.53727 0.54357 0.55009 0.55682 0.56378 0.57096 0.57836 0.58598 0.59382 0.60188 0.37374 0.37728 0.38101 0.38491 0.38901 0.39328 0.39775 0.40239 0.40723 0.41224 Columns 81 through 90: 0.61016 0.61867 0.62739 0.63633 0.64550 0.65488 0.66449 0.67432 0.68436 0.69463 0.41745 0.42283 0.42840 0.43416 0.44010 0.44623 0.45254 0.45904 0.46572 0.47258 Columns 91 through 100: 0.70512 0.71583 0.72676 0.73791 0.74928 0.76087 0.77268 0.78471 0.79697 0.80944 0.47963 0.48687 0.49429 0.50189 0.50968 0.51766 0.52582 0.53416 0.54269 0.55141 Column 101: 0.82214 0.56031 [1,4] = Columns 1 through 10: 0.18190 0.18830 0.19470 0.20110 0.20751 0.21391 0.22031 0.22671 0.23312 0.23952 0.11072 0.11521 0.11971 0.12421 0.12870 0.13320 0.13769 0.14219 0.14669 0.15118 Columns 11 through 20: 0.24592 0.25232 0.25873 0.26513 0.27153 0.27793 0.28434 0.29074 0.29714 0.30354 0.15568 0.16017 0.16467 0.16917 0.17366 0.17816 0.18265 0.18715 0.19164 0.19614 Columns 21 through 30: 0.30995 0.31635 0.32275 0.32915 0.33555 0.34196 0.34836 0.35476 0.36116 0.36757 0.20064 0.20513 0.20963 0.21412 0.21862 0.22312 0.22761 0.23211 0.23660 0.24110 Columns 31 through 40: 0.37397 0.38037 0.38677 0.39318 0.39958 0.40598 0.41238 0.41879 0.42519 0.43159 0.24560 0.25009 0.25459 0.25908 0.26358 0.26807 0.27257 0.27707 0.28156 0.28606 Columns 41 through 50: 0.43799 0.44440 0.45080 0.45720 0.46360 0.47000 0.47641 0.48281 0.48921 0.49561 0.29055 0.29505 0.29955 0.30404 0.30854 0.31303 0.31753 0.32203 0.32652 0.33102 Columns 51 through 60: 0.50202 0.50842 0.51482 0.52122 0.52763 0.53403 0.54043 0.54683 0.55324 0.55964 0.33551 0.34001 0.34450 0.34900 0.35350 0.35799 0.36249 0.36698 0.37148 0.37598 Columns 61 through 70: 0.56604 0.57244 0.57885 0.58525 0.59165 0.59805 0.60445 0.61086 0.61726 0.62366 0.38047 0.38497 0.38946 0.39396 0.39846 0.40295 0.40745 0.41194 0.41644 0.42093 Columns 71 through 80: 0.63006 0.63647 0.64287 0.64927 0.65567 0.66208 0.66848 0.67488 0.68128 0.68769 0.42543 0.42993 0.43442 0.43892 0.44341 0.44791 0.45241 0.45690 0.46140 0.46589 Columns 81 through 90: 0.69409 0.70049 0.70689 0.71329 0.71970 0.72610 0.73250 0.73890 0.74531 0.75171 0.47039 0.47489 0.47938 0.48388 0.48837 0.49287 0.49736 0.50186 0.50636 0.51085 Columns 91 through 100: 0.75811 0.76451 0.77092 0.77732 0.78372 0.79012 0.79653 0.80293 0.80933 0.81573 0.51535 0.51984 0.52434 0.52884 0.53333 0.53783 0.54232 0.54682 0.55132 0.55581 Column 101: 0.82214 0.56031 [1,5] = Columns 1 through 10: 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 Columns 11 through 20: 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 Columns 21 through 30: 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 Columns 31 through 40: 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 Columns 41 through 50: 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 Columns 51 through 60: 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 Columns 61 through 70: 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 Columns 71 through 80: 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 Columns 81 through 90: 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 Columns 91 through 100: 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.82214 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 0.56031 Column 101: 0.82214 0.56031 } octave:86> B = bezier(b,t); octave:87> plot(y{1}(1,:),y{1}(2,:),'o',B(1,:),B(2,:)) octave:88> hold on octave:89> plot(b(1,:),b(2,:),'*') octave:90> b b = 0.92865 0.64900 0.64476 0.18190 0.82214 0.57229 0.79149 0.58546 0.11072 0.56031 octave:91> B=[b(:,1),b(:,1),b(:,1)] B = 0.92865 0.92865 0.92865 0.57229 0.57229 0.57229 octave:92> diary off