Cody

# Problem 1515. Procrustean bed

Solution 257212

Submitted on 6 Jun 2013 by Evan
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x=[1 -4 64 -2304 147456 -14745600]; n=3; y=[1 -4 64]; assert(isequal(procrustes(x,n),y))

x = Columns 1 through 8 1 -4 64 -2304 147456 -14745600 0 0 Column 9 0 ans = 1 -4 64

2   Pass
%% x=[2 -16 384 -18432 1474560]; n=8; y=[2 -16 384 -18432 1474560 0 0 0]; assert(isequal(procrustes(x,n),y))

x = Columns 1 through 8 2 -16 384 -18432 1474560 0 0 0 Columns 9 through 13 0 0 0 0 0 ans = 2 -16 384 -18432 1474560 0 0 0

3   Pass
%% x=[8 -96 3072 -184320 17694720]; n=0; assert(isempty(procrustes(x,n)))

x = 8 -96 3072 -184320 17694720 ans = Empty matrix: 1-by-0

4   Pass
%% x='0.314 arcseconds'; n=12; y='0.314 arcsec'; assert(isequal(procrustes(x,n),y))

x = 0.314 arcseconds ans = 0.314 arcsec

5   Pass
%% x='credible fishers'; n=20; y='credible fishers '; assert(isequal(procrustes(x,n),y))

x = credible fishers ans = credible fishers