Navigation

Operators and Keywords

Function List:

C++ API

test_index-wfi-t.m File Reference


Functions

"query","Octave:fortran-indexing" warning ()
 !assert (isempty(a))
 !warning (wfi.state,"Octave:fortran-indexing")
 !warning ("on","Octave:fortran-indexing")
 !assert (a(1), 1)
 !assert (a(:), 1)
 !assert (a(:,:), 1)
 !assert (a(1,:), 1)
 !assert (a(:, 1), 1)
 !assert (isempty(a(logical(0))))
 !fail ("a(-1);")
 !fail ("a(2);")
 !fail ("a(2,:);")
 !fail ("a(:,2);")
 !fail ("a(-1,:);")
 !fail ("a(:,-1);")
 !fail ("a([1,2,3]);")
 !fail ("a([1;2;3]);")
 !fail ("a([1,2;3,4]);")
 !fail ("a([0,1]);")
 !fail ("a([0;1]);")
 !fail ("a([-1,0]);")
 !fail ("a([-1;0]);")
 !assert (a(1), 4)
 !assert (a(2), 3)
 !assert (all(a(:)==a_prime))
 !assert (all(a(1,:)==a))
 !assert (a(:, 3), 2)
 !assert (all(a(:,:)==a))
 !assert (all(a(logical([0, 1, 1, 0]))==mid_a))
 !fail ("a(0);")
 !fail ("a(5);")
 !fail ("a(0,1);")
 !assert (isempty(a(logical(0),:)))
 !fail ("a(:,0);")
 !assert (isempty(a([])))
 !assert (isempty(a([],:)))
 !assert (isempty(a(:,[])))
 !assert (all(all(a(:,:)==a)))
 !assert (all(a(:)==a_fvec))
 !fail ("a(2);","warning")

Variables

 !warn_fortran_indexing = 1
 !a = []
 !a_prime = [4
 !mid_a = [3,2]
 !a_fvec = [1
 !a_col_1 = [1
 !a_col_2 = [2
 !a_row_1 = [1,2]
 !a_row_2 = [3,4]

Function Documentation

!assert ( all(a(:)==a_fvec)   ) 

!assert ( all(all(a(:,:)==a))   ) 

!assert ( isempty(a(:,[]))   ) 

!assert ( isempty(a([],:))   ) 

!assert ( isempty(a([]))   ) 

!assert ( isempty(a(logical(0),:))   ) 

!assert ( all(a(logical([0, 1, 1, 0]))==mid_a)   ) 

!assert ( all(a(:,:)==a)   ) 

!assert ( a(:, 3)  ,
 
)

!assert ( all(a(1,:)==a)   ) 

!assert ( all(a(:)==a_prime)   ) 

!assert ( a(2)  ,
 
)

!assert ( a(1)  ,
 
)

!assert ( isempty(a(logical(0)))   ) 

!assert ( a(:, 1)  ,
 
)

!assert ( a(1,:)  ,
 
)

!assert ( a(:,:)  ,
 
)

!assert ( a(:)  ,
 
)

!assert ( a(1)  ,
 
)

!assert ( isempty(a)   ) 

!fail ( "a(2);"  ,
"warning"   
)

!fail ( "a(:,0);"   ) 

!fail ( "a(0,1);"   ) 

!fail ( "a(5);"   ) 

!fail ( "a(0);"   ) 

!fail ( "a([-1;0]);"   ) 

!fail ( "a([-1,0]);"   ) 

!fail ( "a([0;1]);"   ) 

!fail ( "a([0,1]);"   ) 

!fail ( "a([1,2;3,4]);"   ) 

!fail ( "a([1;2;3]);"   ) 

!fail ( "a([1,2,3]);"   ) 

!fail ( "a(:,-1);"   ) 

!fail ( "a(-1,:);"   ) 

!fail ( "a(:,2);"   ) 

!fail ( "a(2,:);"   ) 

!fail ( "a(2);"   ) 

!fail ( "a(-1);"   ) 

!warning ( "on"  ,
"Octave:fortran-indexing"   
)

!warning ( wfi.  state,
"Octave:fortran-indexing"   
)

"query", "Octave:fortran-indexing" warning (  )  [virtual]


Variable Documentation

!a = []

!a_col_1 = [1

!a_col_2 = [2

!a_fvec = [1

!a_prime = [4

!a_row_1 = [1,2]

!a_row_2 = [3,4]

!mid_a = [3,2]

!warn_fortran_indexing = 1