Changes

Jump to navigation Jump to search
No change in size ,  07:41, 24 May 2012
→‎Vectorizing Tricks: Use of brackets [] is unnecessary
Line 128: Line 128:  
     for i=1:n, x(i) = sin(2*pi*i*f/r); end
 
     for i=1:n, x(i) = sin(2*pi*i*f/r); end
   −
     x = sin(2*pi*[1:n]*f/r);
+
     x = sin(2*pi*(1:n)*f/r);
    
You can also work with other vectors this way:
 
You can also work with other vectors this way:

Navigation menu