Resuelto


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

casi 6 años hace

Resuelto


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

casi 6 años hace

Resuelto


Bruh
Return 'bruh'.

casi 6 años hace

Resuelto


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

casi 6 años hace

Resuelto


Convert decimal to hex as shown in test cases
Convert decimal to hex as shown in test cases.

casi 6 años hace

Resuelto


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

casi 6 años hace

Resuelto


Sum of integers numbers
Sum of the numbers from 1 to 100

casi 6 años hace

Resuelto


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

casi 6 años hace

Resuelto


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

casi 6 años hace

Resuelto


Average Grade
Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

casi 6 años hace

Resuelto


Convert degrees to radians
Given input in degrees, output to radians

casi 6 años hace

Resuelto


07 - Common functions and indexing 5
Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

casi 6 años hace

Resuelto


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

casi 6 años hace

Resuelto


Conversion from hours to mili sec
Convert given input in hours to mili seconds

casi 6 años hace

Resuelto


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

casi 6 años hace

Resuelto


modulus of a number
find the modulus of a given number

casi 6 años hace

Resuelto


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

casi 6 años hace

Resuelto


Generate vector according to sign of vector
Generate vector according to sign of vector Example: If A=[-2 0 5] then output must be[-1 0 1] meaning that for negative n...

casi 6 años hace

Resuelto


Evaluate Polynomial
Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

casi 6 años hace

Resuelto


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

casi 6 años hace

Resuelto


Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

casi 6 años hace

Resuelto


Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row

casi 6 años hace

Resuelto


Parallel vectors
Return true or false depending on whether 2 vectors are parallel or not. Vectors can be 2 or 3 dimensional. The origin is not c...

casi 6 años hace

Resuelto


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

casi 6 años hace

Resuelto


Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

casi 6 años hace

Resuelto


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

casi 6 años hace

Resuelto


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

casi 6 años hace

Resuelto


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

casi 6 años hace

Resuelto


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

casi 6 años hace

Resuelto


Basic Quadratic Equation
Create the equation: y=(3x)^2+(5x)+35 and compute y for various values of x

casi 6 años hace

Cargar más