;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. score 1x1 8 double array score_for_iteration 4x5 160 double array seconds 1x1 8 double array see_model_before_each_iteration 1x1 8 double array shape_weight 1x1 8 double array show_all_score_figure_types 1x1 8 double array show_inverse_projection 1x3 6 char array show_mesh 1x1 8 double array show_model_after_optimisation 1x1 8 double array show_pixels 1x1 8 double array show_registration_target 1x1 8 double array show_score_bar 1x1 8 double array show_score_using_model 1x1 8 double array show_score_vs_iteration 1x1 8 double array show_specificity_statistics 1x1 8 double array show_target 1x1 8 double array show_warp_targets 1x1 8 double array show_warps_while_optimising 1x1 8 double array smoothness_factor 1x1 8 double array spec_iters 1x1 8 double array spline_type 1x12 24 char array status 3x22 132 char array step_size 1x1 8 double array steps_remaining 1x1 8 double array still_to_go 1x1 8 double array subplot_fig 1x1 8 double array this_set 1x1 8 double array this_step 1x1 8 double array time_for_this_iteration 1x1 8 double array times 1x20 160 double array timestamp_images 1x1 8 double array total_images 1x1 8 double array user_menu 1x1 8 double array variation_kept 1x1 8 double array verbose 1x3 6 char array verbose_score 1x1 8 double array vertical_pane_location 1x1 8 double array w_c_model 1x1 6428 struct array warped_image 50x1 400 double array warped_images 50x4 1600 double array warped_point 50x1 400 double array warped_points 50x4 1600 double array weighting_normalisation_method 1x8 16 char array window 0x0 0 double array Grand total is 2456 elements using 21132 bytes K>> w_c_model w_c_model = shape_weight: 0 pcs: [4x3 double] variances: [0.0518 0.0199 0.0037] params: [4x3 double] mean: [0 2.6021e-17 -2.0817e-17 1.7347e-17] total_var: 9.3381e-04 impdata: 0.0754 sd: [0.2276 0.1409 0.0611] intensity_model: [1x1 struct] shape_model: [1x1 struct] n_shape_modes: 1 label: 'Optimised warp' K>> w_c_model.params ans = -0.1265 -0.1923 -0.0556 0.3740 -0.0364 0.0294 -0.2252 0.0277 0.0860 -0.0222 0.2009 -0.0598 K>> w_c_model.intensity_model ans = pcs: [50x3 double] variances: [0.0518 0.0199 0.0037] params: [4x3 double] mean: [1x50 double] var_r: 9.3381e-04 total_var: 0.0754 impdata: [] sd: [0.2628 0.1627 0.0706] K>> figure, plot(w_c_model.intensity_model.mean) K>> params = w_c_model.intensity_model.params(1,:) params = 0.1265 -0.1923 -0.0556 K>> size(params) ans = 1 3 K>> params = params*w_c_model.intensity_model.pcs'; K>> size(params) ans = 1 50 K>> figure, plot(params); K>> figure, plot(params+w_c_model.intensity_model.mean); K>> figure, plot(warped_images(:,1)); K>> 1971 w_c_model = build_model(warped_images, warped_points, variation_kept, 'Optimised warp', weighting_normalisation_method, shape_weight); K>> 1971 w_c_model = build_model(warped_images, warped_points, variation_kept, 'Optimised warp', weighting_normalisation_method, shape_weight); K>> ans = -0.3998 0.3344 -0.0786 0.5362 0.3126 -0.2541 0.0431 0.0120 0.1739 -0.5273 0.1874 0.0733 0.6897 -0.0067 -0.0114 -0.8043 -0.1590 -0.0730 0.6975 -0.0578 0.0550 -0.1705 -1.0296 -0.0618 0.4241 0.0051 0.1343 -0.4886 0.4016 0.0424 K>> figure K>> figure K>> figure(3), p = findobj('parent',gca,'type','line','selected','on') p = 1.6920e+03 K>> x = get(p,'xdata') x = Columns 1 through 13 1 2 3 4 5 6 7 8 9 10 11 12 13 Columns 14 through 26 14 15 16 17 18 19 20 21 22 23 24 25 26 Columns 27 through 39 27 28 29 30 31 32 33 34 35 36 37 38 39 Columns 40 through 50 40 41 42 43 44 45 46 47 48 49 50 K>> xx = get(p,'Ydata') xx = Columns 1 through 7 -1.0000 -0.9410 -0.8821 -0.8231 -0.7642 -0.7052 -0.6463 Columns 8 through 14 -0.5873 -0.5283 -0.4694 -0.4286 -0.3878 -0.3469 -0.3061 Columns 15 through 21 -0.2653 -0.2245 -0.1837 -0.1429 -0.1020 -0.0612 -0.0204 Columns 22 through 28 0.0204 0.0612 0.1020 0.1429 0.1837 0.2245 0.2653 Columns 29 through 35 0.3061 0.3469 0.3878 0.4286 0.4694 0.5102 0.5510 Columns 36 through 42 0.5918 0.6327 0.6735 0.7143 0.7551 0.7959 0.8186 Columns 43 through 49 0.8413 0.8639 0.8866 0.9093 0.9320 0.9546 0.9773 Column 50 1.0000 K>> y = [-1:0.01:1]; K>> help interp1 INTERP1 1-D interpolation (table lookup). YI = INTERP1(X,Y,XI) interpolates to find YI, the values of the underlying function Y at the points in the vector XI. The vector X specifies the points at which the data Y is given. If Y is a matrix, then the interpolation is performed for each column of Y and YI will be length(XI)-by-size(Y,2). YI = INTERP1(Y,XI) assumes X = 1:N, where N is the length(Y) for vector Y or SIZE(Y,1) for matrix Y. Interpolation is the same operation as "table lookup". Described in "table lookup" terms, the "table" is [X,Y] and INTERP1 "looks-up" the elements of XI in X, and, based upon their location, returns values YI interpolated within the elements of Y. YI = INTERP1(X,Y,XI,'method') specifies alternate methods. The default is linear interpolation. Available methods are: 'nearest' - nearest neighbor interpolation 'linear' - linear interpolation 'spline' - piecewise cubic spline interpolation (SPLINE) 'pchip' - piecewise cubic Hermite interpolation (PCHIP) 'cubic' - same as 'pchip' 'v5cubic' - the cubic interpolation from MATLAB 5, which does not extrapolate and uses 'spline' if X is not equally spaced. YI = INTERP1(X,Y,XI,'method','extrap') uses the specified method for extrapolation for any elements of XI outside the interval spanned by X. Alternatively, YI = INTERP1(X,Y,XI,'method',EXTRAPVAL) replaces these values with EXTRAPVAL. NaN and 0 are often used for EXTRAPVAL. The default extrapolation behavior with four input arguments is 'extrap' for 'spline' and 'pchip' and EXTRAPVAL = NaN for the other methods. For example, generate a coarse sine curve and interpolate over a finer abscissa: x = 0:10; y = sin(x); xi = 0:.25:10; yi = interp1(x,y,xi); plot(x,y,'o',xi,yi) See also INTERP1Q, INTERPFT, SPLINE, INTERP2, INTERP3, INTERPN. K>> yy = interp1(xx,x,y); K>> figure(3);, hold on, plot(yy,y,'r.'); K>> ans = -1.0000 -0.9592 -0.9184 -0.8776 -0.8373 -0.8009 -0.7730 -0.7506 -0.7309 -0.7115 -0.6896 -0.6629 -0.6290 -0.5864 -0.5369 -0.4828 -0.4263 -0.3700 -0.3160 -0.2669 -0.2250 -0.1863 -0.1471 -0.1076 -0.0676 -0.0271 0.0140 0.0555 0.0976 0.1400 0.1828 0.2259 0.2692 0.3128 0.3566 0.4004 0.4134 0.4322 0.5102 0.5760 0.6198 0.6633 0.7066 0.7497 0.7924 0.8348 0.8767 0.9182 0.9592 1.0000 ans = Columns 1 through 7 -1.0000 -0.9592 -0.9184 -0.8775 -0.8362 -0.7909 -0.7373 Columns 8 through 14 -0.6780 -0.6160 -0.5538 -0.4941 -0.4391 -0.3914 -0.3524 Columns 15 through 21 -0.3203 -0.2928 -0.2675 -0.2423 -0.2146 -0.1821 -0.1423 Columns 22 through 28 -0.0995 -0.0570 -0.0149 0.0268 0.0679 0.1085 0.1485 Columns 29 through 35 0.1882 0.2274 0.2662 0.3047 0.3430 0.3811 0.4189 Columns 36 through 42 0.4567 0.5254 0.5882 0.5919 0.6076 0.6456 0.6836 Columns 43 through 49 0.7220 0.7605 0.7994 0.8387 0.8784 0.9185 0.9592 Column 50 1.0000 ans = -1.0000 -0.9592 -0.9183 -0.8774 -0.8364 -0.7953 -0.7560 -0.7218 -0.6918 -0.6646 -0.6383 -0.6115 -0.5838 -0.5561 -0.5276 -0.4979 -0.4666 -0.4338 -0.3993 -0.3624 -0.3223 -0.2780 -0.2281 -0.1716 -0.1109 -0.0505 0.0066 0.0577 0.1060 0.1540 0.2014 0.2478 0.2925 0.3351 0.3760 0.4174 0.4592 0.5014 0.5438 0.5862 0.6287 0.6710 0.7131 0.7547 0.7959 0.8367 0.8776 0.9184 0.9592 1.0000 ans = Columns 1 through 7 -1.0000 -0.9592 -0.9184 -0.8777 -0.8371 -0.7965 -0.7542 Columns 8 through 14 -0.7068 -0.6551 -0.6007 -0.5454 -0.4906 -0.4366 -0.3827 Columns 15 through 21 -0.3295 -0.2776 -0.2272 -0.1784 -0.1313 -0.0866 -0.0450 Columns 22 through 28 -0.0077 0.0240 0.0491 0.0701 0.0913 0.1159 0.1464 Columns 29 through 35 0.1798 0.2133 0.2475 0.2829 0.3198 0.3588 0.3995 Columns 36 through 42 0.4398 0.4796 0.5190 0.5583 0.5974 0.6366 0.6759 Columns 43 through 49 0.7155 0.7555 0.7959 0.8367 0.8776 0.9184 0.9592 Column 50 1.0000 ans = -1.0000 -0.9592 -0.9184 -0.8776 -0.8367 -0.7959 -0.7551 -0.7026 -0.6339 -0.5609 -0.5243 -0.4779 -0.3979 -0.3268 -0.2755 -0.2498 -0.2420 -0.2416 -0.2380 -0.2210 -0.1837 -0.1429 -0.1020 -0.0612 -0.0232 0.0122 0.0486 0.0894 0.1346 0.1808 0.2245 0.2653 0.3061 0.3469 0.3878 0.4286 0.4694 0.5102 0.5510 0.5918 0.6327 0.6735 0.7143 0.7551 0.7959 0.8367 0.8776 0.9184 0.9592 1.0000 ans = Columns 1 through 7 -1.0000 -0.9592 -0.9184 -0.8776 -0.8367 -0.7959 -0.7551 Columns 8 through 14 -0.7260 -0.7130 -0.7044 -0.6594 -0.6241 -0.6225 -0.6120 Columns 15 through 21 -0.5817 -0.5257 -0.4518 -0.3707 -0.2926 -0.2280 -0.1837 Columns 22 through 28 -0.1429 -0.1020 -0.0612 -0.0176 0.0286 0.0738 0.1147 Columns 29 through 35 0.1512 0.1866 0.2245 0.2653 0.3061 0.3469 0.3878 Columns 36 through 42 0.4286 0.4694 0.5102 0.5510 0.5918 0.6327 0.6735 Columns 43 through 49 0.7143 0.7551 0.7959 0.8367 0.8776 0.9184 0.9592 Column 50 1.0000 ans = -1.0000 -0.9592 -0.9184 -0.8776 -0.8367 -0.7959 -0.7551 -0.7143 -0.6735 -0.6327 -0.5918 -0.5510 -0.5102 -0.4694 -0.4286 -0.3878 -0.3469 -0.3061 -0.2653 -0.2245 -0.1837 -0.1429 -0.1020 -0.0612 -0.0204 0.0204 0.0612 0.1020 0.1429 0.1837 0.2245 0.2653 0.3061 0.3469 0.3878 0.4286 0.4694 0.5102 0.5510 0.5918 0.6327 0.6735 0.7143 0.7551 0.7959 0.8367 0.8776 0.9184 0.9592 1.0000 ans = Columns 1 through 7 -1.0000 -0.9592 -0.9184 -0.8776 -0.8367 -0.7959 -0.7551 Columns 8 through 14 -0.7143 -0.6735 -0.6327 -0.5918 -0.5510 -0.5102 -0.4694 Columns 15 through 21 -0.4286 -0.3878 -0.3469 -0.3061 -0.2653 -0.2245 -0.1837 Columns 22 through 28 -0.1429 -0.1020 -0.0612 -0.0204 0.0204 0.0612 0.1020 Columns 29 through 35 0.1429 0.1837 0.2245 0.2653 0.3061 0.3469 0.3878 Columns 36 through 42 0.4286 0.4694 0.5102 0.5510 0.5918 0.6327 0.6735 Columns 43 through 49 0.7143 0.7551 0.7959 0.8367 0.8776 0.9184 0.9592 Column 50 1.0000 ans = -1.0000 -0.9592 -0.9184 -0.8776 -0.8370 -0.7967 -0.7565 -0.7165 -0.6767 -0.6370 -0.5974 -0.5579 -0.5190 -0.4806 -0.4426 -0.4049 -0.3675 -0.3302 -0.2931 -0.2559 -0.2186 -0.1812 -0.1436 -0.1056 -0.0672 -0.0284 0.0066 0.0133 0.0185 0.0580 0.1347 0.2134 0.2627 0.3066 0.3509 0.3954 0.4402 0.4851 0.5300 0.5747 0.6192 0.6634 0.7071 0.7504 0.7930 0.8350 0.8765 0.9179 0.9591 1.0000 ans = Columns 1 through 7 -1.0000 -0.9592 -0.9184 -0.8775 -0.8365 -0.7952 -0.7537 Columns 8 through 14 -0.7121 -0.6703 -0.6283 -0.5863 -0.5441 -0.5014 -0.4581 Columns 15 through 21 -0.4145 -0.3706 -0.3264 -0.2820 -0.2376 -0.1931 -0.1487 Columns 22 through 28 -0.1045 -0.0605 -0.0168 0.0264 0.0692 0.1159 0.1907 Columns 29 through 35 0.2672 0.3093 0.3143 0.3172 0.3496 0.3872 0.4246 Columns 36 through 42 0.4617 0.4986 0.5353 0.5721 0.6089 0.6461 0.6836 Columns 43 through 49 0.7214 0.7598 0.7988 0.8385 0.8786 0.9188 0.9593 Column 50 1.0000 ans = -0.6469 -0.5726 0.5300 0.2763 0.4132 K>> figure(2), p = findobj('type','line','selected','on') p = 1.0310e+03 K>> x = get(p,'xdata') x = Columns 1 through 13 1 2 3 4 5 6 7 8 9 10 11 12 13 Columns 14 through 26 14 15 16 17 18 19 20 21 22 23 24 25 26 Columns 27 through 39 27 28 29 30 31 32 33 34 35 36 37 38 39 Columns 40 through 50 40 41 42 43 44 45 46 47 48 49 50 K>> y = get(p,'Ydata'); K>> figure(2), q = findobj('type','line','selected','on') q = 1.0610e+03 K>> xx = get(q,'Xdata') xx = Columns 1 through 13 1 2 3 4 5 6 7 8 9 10 11 12 13 Columns 14 through 26 14 15 16 17 18 19 20 21 22 23 24 25 26 Columns 27 through 39 27 28 29 30 31 32 33 34 35 36 37 38 39 Columns 40 through 50 40 41 42 43 44 45 46 47 48 49 50 K>> yy = get(q,'Ydata'); K>>