Changes

Jump to navigation Jump to search
2 bytes removed ,  07:39, 24 May 2012
m
→‎Vectorizing Tricks: Use of brackets [] is unnecessary
Line 123: Line 123:  
     for i=1:n, x(i) = i; end
 
     for i=1:n, x(i) = i; end
   −
     x = [1:n];
+
     x = 1:n;
    
This works for expressions on the index by wrapping the index in an expression:
 
This works for expressions on the index by wrapping the index in an expression:

Navigation menu