Community Profile

photo

Paul Morant


323 total contributions since 2019

Paul Morant's Badges

  • Leader
  • Commenter
  • Speed Demon
  • Project Euler I
  • Number Manipulation II Master
  • Number Manipulation I Master
  • Draw Letters
  • CUP Challenge Master
  • Community Group Solver
  • Solver

View details...

Contributions in
View by

Solved


Pascal's Equilateral triangle inside a Matrix!!!
Given a number of row 'n', generate the following pascal's matrix 'p' where spaces are filled by 'zeros'. number of row, n = ...

6 dagen ago

Solved


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

26 dagen ago

Solved


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

26 dagen ago

Solved


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

27 dagen ago

Solved


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

30 dagen ago

Solved


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

30 dagen ago

Solved


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

30 dagen ago

Solved


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

30 dagen ago

Solved


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

30 dagen ago

Solved


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

30 dagen ago

Solved


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

ongeveer een maand ago

Solved


Kepler's Equation
Solve <http://en.wikipedia.org/wiki/Kepler's_equation Kepler's Equation>. Note that the solution is rounded down to 5 decima...

ongeveer een maand ago

Solved


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

ongeveer een maand ago

Solved


Snakes on a plane
Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

ongeveer een maand ago

Solved


Convert String to Morse Code
Convert a given string to international <http://en.wikipedia.org/wiki/Morse_code Morse Code> * Strings will only have [A-z], ...

ongeveer een maand ago

Solved


Formatting currency numbers
Given a number, format it properly for textual display using the notation $xxx,xxx,xxx.xx. Assume that no more than two digits ...

ongeveer een maand ago

Solved


Without the French accent please!
Suppress the French accent. Example 'Déjà présent' -> 'Deja present'

ongeveer een maand ago

Solved


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

ongeveer een maand ago

Solved


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

ongeveer een maand ago

Solved


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

ongeveer een maand ago

Solved


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

ongeveer een maand ago

Solved


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

ongeveer een maand ago

Solved


Create a 3D rotation matrix
Consider an arbitrary coordinate frame {A}. Consider another coordinate frame {B} which has the same origin as {A} but is rotat...

ongeveer een maand ago

Solved


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

ongeveer een maand ago

Solved


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

ongeveer een maand ago

Solved


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

ongeveer een maand ago

Solved


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

ongeveer een maand ago

Solved


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

ongeveer een maand ago

Solved


Guess the number I'm thinking of
In this game you are competing against two other people to guess the number that I'm thinking of. # I randomly choose an *i...

ongeveer een maand ago

Solved


Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.

ongeveer een maand ago

Load more