bsxops

版本 1.3.0.0 (77.4 KB) 作者: Bruno Luong
Force MATLAB operators to behave BSXFUN-like
2.4K 次下载
更新时间 2009/6/13

查看许可证

Force MATLAB operators to behave BSXFUN-like, i.e. operate multi-dimensional array with automatic expansion. Here is an example:

>> bsxops(1) % Activate the bsxops mode

>> (1:3) + (4:5)'.*reshape([10 11],[1 1 2])
ans(:,:,1) =

41 42 43
51 52 53

ans(:,:,2) =

45 46 47
56 57 58

>> bsxops(0) % Compatible mode
>> (1:3) + (4:5)'.*reshape([10 11],[1 1 2])
??? Error using ==> times
Number of array dimensions must match for binary array op.

引用格式

Bruno Luong (2024). bsxops (https://www.mathworks.com/matlabcentral/fileexchange/23821-bsxops), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Arithmetic Operations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

bsxops/

bsxops/classops/@char/

bsxops/classops/@double/

bsxops/classops/@int16/

bsxops/classops/@int32/

bsxops/classops/@int64/

bsxops/classops/@int8/

bsxops/classops/@logical/

bsxops/classops/@single/

bsxops/classops/@uint16/

bsxops/classops/@uint32/

bsxops/classops/@uint64/

bsxops/classops/@uint8/

版本 已发布 发行说明
1.3.0.0

Direct use (not overloaded): Explicit bsx (sub)classes objects can be created and used. Subclasses works on Matlab versions that support Object Oriented Programing (OOP), i.e., 2008A onward.

Overloading bsxops is still working on previous Matlab.

1.2.0.0

Correct BUG min/max (two-output call)

1.0.0.0