Mercurial > hg > octave-nkf
comparison libinterp/corefcn/bsxfun.cc @ 17245:7babcdb9bc13
Use ... instead of \ for line continuation marker.
* plotimages.m, bsxfun.cc, cellfun.cc, __unimplemented__.m,
importdata.m, textscan.m, edit.m, fsolve.m, sqp.m,
__gnuplot_drawnow__.m, __marching_cube__.m, stemleaf.m, polyfit.m,
z_test.m, z_test_2.m, test.m:
Use ... instead of \ for line continuation marker.
author | Stefan Mahr <dac922@gmx.de> |
---|---|
date | Mon, 12 Aug 2013 17:36:54 +0200 |
parents | 2fc554ffbc28 |
children | d63878346099 |
comparison
equal
deleted
inserted
replaced
17244:9de751a10910 | 17245:7babcdb9bc13 |
---|---|
771 %!assert (bsxfun (@or, a > 0, b > 0), (aa > 0) | (bb > 0)) | 771 %!assert (bsxfun (@or, a > 0, b > 0), (aa > 0) | (bb > 0)) |
772 | 772 |
773 %% Test automatic bsxfun | 773 %% Test automatic bsxfun |
774 % | 774 % |
775 %!test | 775 %!test |
776 %! funs = {@plus, @minus, @times, @rdivide, @ldivide, @power, @max, @min, \ | 776 %! funs = {@plus, @minus, @times, @rdivide, @ldivide, @power, @max, @min, ... |
777 %! @rem, @mod, @atan2, @hypot, @eq, @ne, @lt, @le, @gt, @ge, \ | 777 %! @rem, @mod, @atan2, @hypot, @eq, @ne, @lt, @le, @gt, @ge, ... |
778 %! @and, @or, @xor }; | 778 %! @and, @or, @xor }; |
779 %! | 779 %! |
780 %! float_types = {@single, @double}; | 780 %! float_types = {@single, @double}; |
781 %! int_types = {@int8, @int16, @int32, @int64, \ | 781 %! int_types = {@int8, @int16, @int32, @int64, ... |
782 %! @uint8, @uint16, @uint32, @uint64}; | 782 %! @uint8, @uint16, @uint32, @uint64}; |
783 %! | 783 %! |
784 %! x = rand (3) * 10-5; | 784 %! x = rand (3) * 10-5; |
785 %! y = rand (3,1) * 10-5; | 785 %! y = rand (3,1) * 10-5; |
786 %! | 786 %! |
790 %! | 790 %! |
791 %! fun = funs{i}; | 791 %! fun = funs{i}; |
792 %! f_type = float_types{j}; | 792 %! f_type = float_types{j}; |
793 %! i_type = int_types{k}; | 793 %! i_type = int_types{k}; |
794 %! | 794 %! |
795 %! assert (bsxfun (fun, f_type (x), i_type (y)), \ | 795 %! assert (bsxfun (fun, f_type (x), i_type (y)), ... |
796 %! fun (f_type(x), i_type (y))); | 796 %! fun (f_type(x), i_type (y))); |
797 %! assert (bsxfun (fun, f_type (y), i_type (x)), \ | 797 %! assert (bsxfun (fun, f_type (y), i_type (x)), ... |
798 %! fun (f_type(y), i_type (x))); | 798 %! fun (f_type(y), i_type (x))); |
799 %! | 799 %! |
800 %! assert (bsxfun (fun, i_type (x), i_type (y)), \ | 800 %! assert (bsxfun (fun, i_type (x), i_type (y)), ... |
801 %! fun (i_type (x), i_type (y))); | 801 %! fun (i_type (x), i_type (y))); |
802 %! assert (bsxfun (fun, i_type (y), i_type (x)), \ | 802 %! assert (bsxfun (fun, i_type (y), i_type (x)), ... |
803 %! fun (i_type (y), i_type (x))); | 803 %! fun (i_type (y), i_type (x))); |
804 %! | 804 %! |
805 %! assert (bsxfun (fun, f_type (x), f_type (y)), \ | 805 %! assert (bsxfun (fun, f_type (x), f_type (y)), ... |
806 %! fun (f_type (x), f_type (y))); | 806 %! fun (f_type (x), f_type (y))); |
807 %! assert (bsxfun (fun, f_type(y), f_type(x)), \ | 807 %! assert (bsxfun (fun, f_type(y), f_type(x)), ... |
808 %! fun (f_type (y), f_type (x))); | 808 %! fun (f_type (y), f_type (x))); |
809 %! endfor | 809 %! endfor |
810 %! endfor | 810 %! endfor |
811 %! endfor | 811 %! endfor |
812 %! | 812 %! |