Skip to main content
Commonmark migration
Source Link

#Octave, 46 43 36 30 23 bytes

Octave, 46 43 36 30 23 bytes

tic;(-1e3:1e3)',toc*1e3

This will print:

ans =

  -1000
   -999
   -998
   -997
   -996
   -995

If you don't like the ans = , then we have to add an additional 6 bytes for disp:

tic;disp((-1e3:1e3)'),toc*1e3

Saved a lot of bytes thanks to a few reminders from rahnema1.

Explanation:

tic;                              % Starts timer
         (-1e3:1e3)'              % A vertical vector -1000 ... 1000
    disp((-1e3:1e3)'),            % Display this vector
                      toc*1e3     % Stop the timer and output the time in milliseconds

#Octave, 46 43 36 30 23 bytes

tic;(-1e3:1e3)',toc*1e3

This will print:

ans =

  -1000
   -999
   -998
   -997
   -996
   -995

If you don't like the ans = , then we have to add an additional 6 bytes for disp:

tic;disp((-1e3:1e3)'),toc*1e3

Saved a lot of bytes thanks to a few reminders from rahnema1.

Explanation:

tic;                              % Starts timer
         (-1e3:1e3)'              % A vertical vector -1000 ... 1000
    disp((-1e3:1e3)'),            % Display this vector
                      toc*1e3     % Stop the timer and output the time in milliseconds

Octave, 46 43 36 30 23 bytes

tic;(-1e3:1e3)',toc*1e3

This will print:

ans =

  -1000
   -999
   -998
   -997
   -996
   -995

If you don't like the ans = , then we have to add an additional 6 bytes for disp:

tic;disp((-1e3:1e3)'),toc*1e3

Saved a lot of bytes thanks to a few reminders from rahnema1.

Explanation:

tic;                              % Starts timer
         (-1e3:1e3)'              % A vertical vector -1000 ... 1000
    disp((-1e3:1e3)'),            % Display this vector
                      toc*1e3     % Stop the timer and output the time in milliseconds
deleted 1 character in body
Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295

#Octave, 46 43 36 30 23 bytes

tic;(-1e3:1e3)',toc*1e3

This will print:

ans =

  -1000
   -999
   -998
   -997
   -996
   -995

If you don't like the ans = , then we have to add an additional 76 bytes for disp:

 tic;disp((-1e3:1e3)'),toc*1e3

Saved a lot of bytes thanks to a few reminders from rahnema1.

Explanation:

tic;                              % Starts timer
         (-1e3:1e3)'              % A vertical vector -1000 ... 1000
    disp((-1e3:1e3)'),            % Display this vector
                      toc*1e3     % Stop the timer and output the time in milliseconds

#Octave, 46 43 36 30 23 bytes

tic;(-1e3:1e3)',toc*1e3

This will print:

ans =

  -1000
   -999
   -998
   -997
   -996
   -995

If you don't like the ans = , then we have to add an additional 7 bytes for disp:

 tic;disp((-1e3:1e3)'),toc*1e3

Saved a lot of bytes thanks to a few reminders from rahnema1.

Explanation:

tic;                              % Starts timer
         (-1e3:1e3)'              % A vertical vector -1000 ... 1000
    disp((-1e3:1e3)'),            % Display this vector
                      toc*1e3     % Stop the timer and output the time in milliseconds

#Octave, 46 43 36 30 23 bytes

tic;(-1e3:1e3)',toc*1e3

This will print:

ans =

  -1000
   -999
   -998
   -997
   -996
   -995

If you don't like the ans = , then we have to add an additional 6 bytes for disp:

tic;disp((-1e3:1e3)'),toc*1e3

Saved a lot of bytes thanks to a few reminders from rahnema1.

Explanation:

tic;                              % Starts timer
         (-1e3:1e3)'              % A vertical vector -1000 ... 1000
    disp((-1e3:1e3)'),            % Display this vector
                      toc*1e3     % Stop the timer and output the time in milliseconds
added 58 characters in body
Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295

#Octave, 46 43 36 3030 23 bytes

tic;(-1e3:1e3)',toc*1e3

This will print:

ans =

  -1000
   -999
   -998
   -997
   -996
   -995

If you don't like the ans = , then we have to add an additional 7 bytes for disp:

 tic;disp((-1e3:1e3)'),toc*1e3

Saved 7a lot of bytes thanks to a reminderfew reminders from rahnema1 rahnema1.

Explanation in progress:

tic;                              % Starts timer
         (-1e3:1e3)'              % A vertical vector -1000 ... 1000
    disp((-1e3:1e3)'),            % Display this vector
                      toc*1e3     % Stop the timer and output the time in milliseconds

#Octave, 46 43 36 30 bytes

 tic;disp((-1e3:1e3)'),toc*1e3

Saved 7 bytes thanks to a reminder from rahnema1.

Explanation in progress

#Octave, 46 43 36 30 23 bytes

tic;(-1e3:1e3)',toc*1e3

This will print:

ans =

  -1000
   -999
   -998
   -997
   -996
   -995

If you don't like the ans = , then we have to add an additional 7 bytes for disp:

 tic;disp((-1e3:1e3)'),toc*1e3

Saved a lot of bytes thanks to a few reminders from rahnema1.

Explanation:

tic;                              % Starts timer
         (-1e3:1e3)'              % A vertical vector -1000 ... 1000
    disp((-1e3:1e3)'),            % Display this vector
                      toc*1e3     % Stop the timer and output the time in milliseconds
added 58 characters in body
Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295
Loading
edited body
Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295
Loading
Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295
Loading