# Ntandoyakhe Tshuma

**Statistics**

RANK**180,891**

of 239,351

REPUTATION**0**

CONTRIBUTIONS

**3** Questions

**1** Answer

ANSWER ACCEPTANCE **
66.67%
**

VOTES RECEIVED**0**

RANK

of 16,807

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Solved

Summing digits

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

15 days ago

Solved

The Goldbach Conjecture, Part 2

The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

20 days ago

Solved

Return the 3n+1 sequence for n

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

1 month ago

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

1 month ago

Solved

Pascal's Triangle

Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

2 months ago

Solved

Fibonacci sequence

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

2 months ago

Solved

Target sorting

Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

2 months ago

Solved

Which values occur exactly three times?

Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

2 months ago

Solved

Kaprekar Steps

6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

2 months ago

Question

How do you get to Keprekar's constant when you start with a one digit number?

How do you get to Keprekar's constant when you start with a one digit number? As far as l know there are 2 values considered as ...

2 months ago | 1 answer | 0

### 1

answerSolved

Find the two most distant points

Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

2 months ago

Solved

Elapsed Time

Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

2 months ago

Breaking a Number into 1000s, 100, 50, 10, 5,1

**I figured it out, my solution was big in size but it worked.

2 months ago | 0

| accepted

Solved

Encode Roman Numerals

Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

2 months ago

Question

Breaking a Number into 1000s, 100, 50, 10, 5,1

Hello Everyone. I am trying to figure out a way to automatically break a given number into sums of 1000, 500, 100, 50, 10, 5 an...

2 months ago | 2 answers | 0

### 2

answersSolved

Find state names that start with the letter N

Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

2 months ago

Solved

Interpolator

You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

2 months ago

Solved

Calculate the sphericity of a Raschig ring

Sphericity is a measure of the roundness of any particle. It was defined by Wadell in 1935 as the ratio of the 'surface area of ...

2 months ago

Solved

Convert a temperature reading from Celsius to an unknown scale

Two of the most famous temperature scales are the Celsius and the Fahrenheit scale. In reality, however, there are so many other...

2 months ago

Question

Problem 45396. Design a tubesheet for shell-and-tube heat exchangers

% calculated th relationship between number of complete suqares and number of % total squares using the area of the circle ...

2 months ago | 1 answer | 0

### 1

answerSolved

Longest run of consecutive numbers

Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

2 months ago

Solved

Generate a vector like 1,2,2,3,3,3,4,4,4,4

Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

2 months ago

Solved

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

2 months ago

Solved

Magic is simple (for beginners)

Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

2 months ago

Solved

Make a random, non-repeating vector.

This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

2 months ago

Solved

Roll the Dice!

*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

2 months ago

Solved

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

2 months ago

Solved

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...

2 months ago

Solved

Create times-tables

At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

2 months ago

Solved

Getting the indices from a vector

This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

2 months ago