A résolu


Extract the Acrostic Message
An acrostic cipher is a way of embedding one message within another by taking the first (or last) word of each line. Given a str...

7 mois il y a

A résolu


Boustrophedon
Given a vector v and a positive integer n, return an m-by-n matrix containing the elements of v row-wise, alternating left-to-ri...

7 mois il y a

A résolu


Create block matrix of integers (j+k-1) - Part II
Given m, n, p, and q, create an m-by-n matrix made up of submatrices, each sized p-by-q (if possible - the last row and column o...

7 mois il y a

A résolu


Create block matrix of integers (j+k-1) - Part I
Given m, n, p, and q, create a matrix of m-by-n blocks (submatrices), each sized p-by-q. The elements of the (j,k)th block all h...

7 mois il y a

A résolu


Dartboard Average II
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...

7 mois il y a

A résolu


Dartboard Average I
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...

7 mois il y a

A résolu


Possible Rugby Scores
Given a natural number s (> 4), representing a rugby team's score, return an n-by-3 matrix representing all n possible combinati...

7 mois il y a

A résolu


Split Even Number Into Two Primes
Given an even whole number n (> 2), return a 2-element vector of primes, p, such that p(1) + p(2) = n. The elements of p should ...

7 mois il y a

A résolu


Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits)
Given a positive integer n, determine whether n is "oddish" or "evenish" - that is, whether the sum of the digits of n is odd or...

7 mois il y a

A résolu


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

7 mois il y a

A résolu


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

7 mois il y a

A résolu


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not count...

7 mois il y a

A résolu


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

7 mois il y a

A résolu


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

7 mois il y a

A résolu


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

7 mois il y a

A résolu


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

7 mois il y a

A résolu


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

7 mois il y a

A résolu


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

7 mois il y a

A résolu


Return the first and last characters of a character array
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

7 mois il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

7 mois il y a

A résolu


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

7 mois il y a

A résolu


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

8 mois il y a

A résolu


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to find the logical indices o...

8 mois il y a

A résolu


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

8 mois il y a

A résolu


The Goldbach Conjecture
The Goldbach conjecture asserts that every even integer greater than 2 can be expressed as the sum of two primes. Given the eve...

8 mois il y a

A résolu


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

8 mois il y a

A résolu


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

8 mois il y a

A résolu


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

8 mois il y a

A résolu


Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

8 mois il y a

A résolu


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

8 mois il y a

Charger plus