Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

##Mata, (削除) 15 (削除ここまで) 29 Bytes args i mata A=1..10 B=`i'*A B

Mata, (削除) 15 (削除ここまで) 29 Bytes

args i
mata
A=1..10
B=`i'*A
B

Mata is the matrix programming language in the Stata commercial statistics package. Code creates a matrix, multiplies by the input (2 in this case) and the outputs the new matrix

##Output

Output

 1 2 3 4 5 6 7 8 9 10
 +---------------------------------------------------+
 1 | 2 4 6 8 10 12 14 16 18 20 |
 +---------------------------------------------------+

##Mata, (削除) 15 (削除ここまで) 29 Bytes args i mata A=1..10 B=`i'*A B

Mata is the matrix programming language in the Stata commercial statistics package. Code creates a matrix, multiplies by the input (2 in this case) and the outputs the new matrix

##Output

 1 2 3 4 5 6 7 8 9 10
 +---------------------------------------------------+
 1 | 2 4 6 8 10 12 14 16 18 20 |
 +---------------------------------------------------+

Mata, (削除) 15 (削除ここまで) 29 Bytes

args i
mata
A=1..10
B=`i'*A
B

Mata is the matrix programming language in the Stata commercial statistics package. Code creates a matrix, multiplies by the input (2 in this case) and the outputs the new matrix

Output

 1 2 3 4 5 6 7 8 9 10
 +---------------------------------------------------+
 1 | 2 4 6 8 10 12 14 16 18 20 |
 +---------------------------------------------------+
Edited in response to Jonathan Allen to clarify inputs
Source Link
f1rstguess
  • 191
  • 1
  • 4

##Mata, 15(削除) 15 (削除ここまで) 29 Bytes args i mata A=1..10 B=`i'*A B

A=1..10
B=2*A
B

Mata is the matrix programming language in the Stata commercial statistics package. Code creates a matrix, multiplies by the input (2 in this case) and the outputs the new matrix

##Output

 1 2 3 4 5 6 7 8 9 10
 +---------------------------------------------------+
 1 | 2 4 6 8 10 12 14 16 18 20 |
 +---------------------------------------------------+

##Mata, 15 Bytes

A=1..10
B=2*A
B

Mata is the matrix programming language in the Stata commercial statistics package. Code creates a matrix, multiplies by the input (2 in this case) and the outputs the new matrix

##Output

 1 2 3 4 5 6 7 8 9 10
 +---------------------------------------------------+
 1 | 2 4 6 8 10 12 14 16 18 20 |
 +---------------------------------------------------+

##Mata, (削除) 15 (削除ここまで) 29 Bytes args i mata A=1..10 B=`i'*A B

Mata is the matrix programming language in the Stata commercial statistics package. Code creates a matrix, multiplies by the input (2 in this case) and the outputs the new matrix

##Output

 1 2 3 4 5 6 7 8 9 10
 +---------------------------------------------------+
 1 | 2 4 6 8 10 12 14 16 18 20 |
 +---------------------------------------------------+
Source Link
f1rstguess
  • 191
  • 1
  • 4

##Mata, 15 Bytes

A=1..10
B=2*A
B

Mata is the matrix programming language in the Stata commercial statistics package. Code creates a matrix, multiplies by the input (2 in this case) and the outputs the new matrix

##Output

 1 2 3 4 5 6 7 8 9 10
 +---------------------------------------------------+
 1 | 2 4 6 8 10 12 14 16 18 20 |
 +---------------------------------------------------+

AltStyle によって変換されたページ (->オリジナル) /