comparison scripts/statistics/distributions/wblrnd.m @ 10549:95c3e38098bf

Untabify .m scripts
author Rik <code@nomad.inbox5.com>
date Fri, 23 Apr 2010 11:28:50 -0700
parents 3306cfcb856e
children be55736a0783
comparison
equal deleted inserted replaced
10548:479536c5bb10 10549:95c3e38098bf
35 35
36 if (nargin > 1) 36 if (nargin > 1)
37 if (!isscalar(shape) || !isscalar(scale)) 37 if (!isscalar(shape) || !isscalar(scale))
38 [retval, shape, scale] = common_size (shape, scale); 38 [retval, shape, scale] = common_size (shape, scale);
39 if (retval > 0) 39 if (retval > 0)
40 error ("wblrnd: shape and scale must be of common size or scalar"); 40 error ("wblrnd: shape and scale must be of common size or scalar");
41 endif 41 endif
42 endif 42 endif
43 endif 43 endif
44 44
45 if (nargin == 4) 45 if (nargin == 4)
50 error ("wblrnd: c must be a positive integer"); 50 error ("wblrnd: c must be a positive integer");
51 endif 51 endif
52 sz = [r, c]; 52 sz = [r, c];
53 53
54 if (any (size (scale) != 1) && 54 if (any (size (scale) != 1) &&
55 ((length (size (scale)) != length (sz)) 55 ((length (size (scale)) != length (sz))
56 || any (size (scale) != sz))) 56 || any (size (scale) != sz)))
57 error ("wblrnd: shape and scale must be scalar or of size [r, c]"); 57 error ("wblrnd: shape and scale must be scalar or of size [r, c]");
58 endif 58 endif
59 elseif (nargin == 3) 59 elseif (nargin == 3)
60 if (isscalar (r) && (r > 0)) 60 if (isscalar (r) && (r > 0))
61 sz = [r, r]; 61 sz = [r, r];
64 else 64 else
65 error ("wblrnd: r must be a positive integer or vector"); 65 error ("wblrnd: r must be a positive integer or vector");
66 endif 66 endif
67 67
68 if (any (size (scale) != 1) && 68 if (any (size (scale) != 1) &&
69 ((length (size (scale)) != length (sz)) 69 ((length (size (scale)) != length (sz))
70 || any (size (scale) != sz))) 70 || any (size (scale) != sz)))
71 error ("wblrnd: shape and scale must be scalar or of size sz"); 71 error ("wblrnd: shape and scale must be scalar or of size sz");
72 endif 72 endif
73 elseif (nargin == 2) 73 elseif (nargin == 2)
74 sz = size(shape); 74 sz = size(shape);
75 else 75 else