-
Notifications
You must be signed in to change notification settings - Fork 1
Home
rdbyk edited this page Mar 16, 2018
·
133 revisions
- Use
typeinstead oftypeof, whenever possible. - Use
nargin,nargoutinstead ofargn. - Use
x==[]instead ofisempty(x), whenever possible. - Use
x<>[]instead of~isempty(x), whenever possible. - Use
issquareinstead ofsize, whenever possible. - Use
length(x)instead ofsize(x,'*'), whenever possible. - Use
x(length(x))orx(size(x,'*')instead ofx($), whenever possible. - Use
&&,||instead of&,|, whenever possible. - Use
~(A || B)instead of~A && ~B(cf. De Morgan's Laws). - Use
~(A && B)instead of~A || ~B(cf. De Morgan's Laws). - Use
execstrinstead ofevstr, whenever possible. - Use
tokensinstead ofstrsplit, whenever possible. - Use
matrix(A,length(A),1)instead ofA(:), whenever possible. - Use
A.Binstead ofA("B"), whenever possible. - Use
ones(m,n).*.Ainstead ofrepmat(A,m,n), whenever possible. - Use
size(x)==1instead ofisscalar(x), whenever possible. - Use
A=[]instead ofA(:)=[], whenever possible. - Use
.*and./instead*of/for integer types, whenever possible.
-
%balisc- Useful to check whether it is Balisc, e.g. use
exists("%balisc"). - Returns a single integer (e.g.
0), which indicates the version of Balisc
- Useful to check whether it is Balisc, e.g. use
-
isprotected,protect,unprotect- Provide an interface to the protection mechanism of arbitrary variables
- Currently they are rather a supplement to
predefthan a replacement of it