已解决


Stacking vectors into a matrix
Given a 4x1 vector a, and a 2x2 matrix b, create a matrix M in which the first 2 rows are each identical to a and the last two r...

4 years 前

已解决


Matrix convolution
A certain convolution step involves an elementwise multipication between two 3x3 matrices and taking the resulting sum of the el...

4 years 前

已解决


Matrix Indexing
Given a matrix A and scalars r,c,i, find the product of two elements, with the first element located at row r and column c (doub...

4 years 前

已解决


The Piggy Bank Problem
Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.] Bonus though...

4 years 前

已解决


Roman numbers: how old is that building?
The front of old buildings sometimes show the year when they were built in roman numbers. These number are rather confusing and ...

4 years 前

已解决


MATLAB Basics: Complex Numbers
For a given complex number, x, return the real and imaginary parts as a vector, y = [Real Imaginary].

4 years 前

已解决


Compute the harmonic numbers
The nth <https://mathworld.wolfram.com/HarmonicNumber.html harmonic number> is defined as the sum of the reciprocals of the inte...

4 years 前

已解决


Create a function that gives a matrix like the following
x=3 y= [1 -1 -1 0 1 -1 0 0 1]; -------------------------------- x=5 y= [ 1 -1 -...

4 years 前

已解决


MATLAB Basics: Complex Argument
For a given complex number, x, return the argument, y, in degrees.

4 years 前

已解决


MATLAB Basics: Complex Conjugates
For a given complex number, x, return the complex conjugate, y.

4 years 前

已解决


Write script that gives matrix like the following example:)
if x=2; y=[2 1; 1 1] if x=4; y=[4 3 2 1 3 3 2 1 0 2 2 1 0 0 1 1] if x=5; y=[5 4 3 2 ...

4 years 前

已解决


Generate a matrix as follows
write a Function that gives like the following for a random n: n=2 ans= [ 0 1 1 0] n=6 ans= [ 0 ...

4 years 前

已解决


Draw matrix 'Swiss flag'( Euro 2020)
Draw a x-by-x matrix 'Swiss flag' using '1' and 0.(x is odd and bigger than 4) Example x=5 ans = [1 1 1 1 ...

4 years 前

已解决


Draw a x-by-x matrix 'Denmark flag'(Euro(2020)
Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

4 years 前

已解决


List Honaker primes
The number 131 is the 32nd prime number. It is a Honaker prime because the sum of its digits (1+3+1) equals the sum of the digit...

4 years 前

已解决


Find numbers in the Popular Computing Z-sequence
Here’s a quick one. In 1977 the magazine Popular Computing sought “problem situations for which the computer is the best (if not...

4 years 前

已解决


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

4 years 前

已解决


Hoax Numbers
A Hoax Number (OEIS A019506) is defined as a composite number, whose sum of digits is equal to the sum of digits of its distinct...

4 years 前

已解决


Palindromic Prime
Palindromic Prime is a prime number that is also a palindromic number. (Wiki, OEIS) If given a monotonic series (increment=1) ...

4 years 前

已解决


Which Prime
Given two prime numbers, specify the relation between them i.e. - 'Twin Prime', 'Cousin Prime', 'Sexy Prime' or 'None'

4 years 前

已解决


Draw 'S'
draw S using nxn matrix, where n is odd and greater than 4 S = [1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 ...

4 years 前

已解决


Double Fibonacci
double_fibonacci takes two integers, each greater than one, as input arguments (it does not have to check the format of the inpu...

4 years 前

已解决


Cancel Middle
Write a function called cancel_middle that takes A, an n-by-m matrix, as an input where both n and m are odd numbers an...

4 years 前

已解决


Sort Except Zeros
Sort the numbers in a vector. But the position of zeros should not be changed. Example: sort_except_zeros( [5 3 0 0 2 4] ) == [...

4 years 前

已解决


Get to a number faster.
If you start with $1 and, with each move, you can either double your money or add another $1, what is the smallest number of mov...

4 years 前

已解决


Find the nth composite number.
Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 i...

4 years 前

已解决


Twist 'n' Match
Given n and m, construct an n-by-n matrix a such that a, when rotated 90 degrees and compared with itself, matches itself in exa...

4 years 前

已解决


Math with Roman Numerals
Given a function R within (+,-,*,/) and two Roman numerals a & b, compute aRb in Roman numerals.

4 years 前

已解决


Implement a bubble sort technique and output the number of swaps required
A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...

4 years 前

已解决


Kryptos - CIA Cypher Sculpture: Vigenere Encryption
The <http://en.wikipedia.org/wiki/Kryptos Kryptos Sculpture> contains four encypted messages. This Challenge is to Encrypt tw...

4 years 前

加载更多