explosionado
Industrial
- Jan 5, 2016
- 1
Hello, I dont know how to start to program the two programs I will explain below, If someone can help me I will be gratefull.
the first one is:
Design a script that draw two concentric ellipses, the common center of origin and semiaxes a = 2,
b = 6 (foreign ellipse) and a = 1, b = 3 (inner ellipse). Once drawn ellipses, the program
You must issue a message saying: Press any key to start the movement, and stop up
you press a letter (using the pause command). Pressing a key should be both ellipses
Moving to become approximately concentric ellipses respective axle shafts
a = 8, b = 2 (outer ellipse) and a = 4, B = 1 (inner ellipse). Perform the movement with a
loop 100 steps.
and the second one is:
Z assembly 26 of the integers modulo 26 is formed by the numbers 0 to 25 (which are
all possible remaining integer division by 26). If we define a sum of the form
a + b = mod (a + b, 26) and a product a · b = mod (a · b, 26), can encrypt text messages
breaking them down into blocks of 3 consecutive letters abc and transform this array (vector)
X = (a, b, c) in another array Y = (α, β, γ) by a linear transformation Y = AX, being
To a 3 × 3 matrix with coefficients in Z26. The matrix is selected so that it is autoinversa,
that is, such that A2 = I and such that det A is prime with 26. Since double ('a') gives
97 response to assign the letter 'a'el value 0 to do a = double (' a ') - 97. This
Similarly, the letter 'z' (not considered the double 'l' as a new and did not include the letter 'n')
It corresponds to the number 25.
(A) Write a script, called encode.m ask you a text message in lower case (without
accents, spaces or punctuation marks) and encrypt the message (extended with letters 'a' to
that is 3 * n letters) using the matrix
A =
20 9 0
25 6 0
0 0 25
(B) Encrypt the message: 'What good is spoiled, wanting to improve' and decrypt the message
(Extended): 'gnwivtgehvoaeewrtwkrjxkyrkachnsvobqwrsaybymnjesa'.
the first one is:
Design a script that draw two concentric ellipses, the common center of origin and semiaxes a = 2,
b = 6 (foreign ellipse) and a = 1, b = 3 (inner ellipse). Once drawn ellipses, the program
You must issue a message saying: Press any key to start the movement, and stop up
you press a letter (using the pause command). Pressing a key should be both ellipses
Moving to become approximately concentric ellipses respective axle shafts
a = 8, b = 2 (outer ellipse) and a = 4, B = 1 (inner ellipse). Perform the movement with a
loop 100 steps.
and the second one is:
Z assembly 26 of the integers modulo 26 is formed by the numbers 0 to 25 (which are
all possible remaining integer division by 26). If we define a sum of the form
a + b = mod (a + b, 26) and a product a · b = mod (a · b, 26), can encrypt text messages
breaking them down into blocks of 3 consecutive letters abc and transform this array (vector)
X = (a, b, c) in another array Y = (α, β, γ) by a linear transformation Y = AX, being
To a 3 × 3 matrix with coefficients in Z26. The matrix is selected so that it is autoinversa,
that is, such that A2 = I and such that det A is prime with 26. Since double ('a') gives
97 response to assign the letter 'a'el value 0 to do a = double (' a ') - 97. This
Similarly, the letter 'z' (not considered the double 'l' as a new and did not include the letter 'n')
It corresponds to the number 25.
(A) Write a script, called encode.m ask you a text message in lower case (without
accents, spaces or punctuation marks) and encrypt the message (extended with letters 'a' to
that is 3 * n letters) using the matrix
A =
20 9 0
25 6 0
0 0 25
(B) Encrypt the message: 'What good is spoiled, wanting to improve' and decrypt the message
(Extended): 'gnwivtgehvoaeewrtwkrjxkyrkachnsvobqwrsaybymnjesa'.