Added more stuff to the example.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402723
This commit is contained in:
Davis King 2008-12-12 00:16:25 +00:00
parent 0f89c0f601
commit 279e4d40f2
1 changed files with 6 additions and 2 deletions

View File

@ -176,6 +176,9 @@ int main()
// MATLAB: A = B(1,:)
A = rowm(B,0);
// MATLAB: A = B([1:2],:)
A = rowm(B,range(0,1));
// MATLAB: A = B(:,1)
A = colm(B,0);
@ -201,8 +204,6 @@ int main()
B = 5;
// or equivalently
set_all_elements(B,5);
// or equivalently
set_subm(B,get_rect(B)) = 5;
// MATLAB: B([1:2],[1,2]) = 7
@ -214,6 +215,9 @@ int main()
// MATLAB: B(:,1) = 4
set_colm(B,0) = 4;
// MATLAB: B(:,[1:2]) = 4
set_colm(B,range(0,1)) = 4;
// MATLAB: B(:,1) = B(:,2)
set_colm(B,0) = colm(B,1);