Triple function composition
Given three functions f,g and h, create the composed function y=f(g(h)).
Example
f = @(x) x+1
g = @(x) x/2
h = @(x) ...
4 years 前
已解决
Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n.
Example
x= [ 1 2 3...
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], ...
4 years 前
已解决
Pig Latin to English Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the <http://en.wikipedia.org/wiki/Pi...
4 years 前
已解决
English to Pig Latin Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the wikipedia entry for Pig Latin):
...
4 years 前
已解决
Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...
4 years 前
已解决
Reverse the Words (not letters) of a String
*Description*
Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...
4 years 前
已解决
letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...
4 years 前
已解决
Space Saver
Remove all characters that are below a space in ASCII value.
4 years 前
已解决
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:
* ...
4 years 前
已解决
QWERTY Shift Encoder
Encode a string using the QWERTY shift code.
This code is where you touch type but are offset by one character to the right.
...
4 years 前
已解决
QWERTY Shift Code Decoder
Decode a string encoded using the QWERTY shift code.
QWERTY shift code is where the message was touch typed but with an offse...
4 years 前
已解决
Convert a structure into a string
Convert the contents of each fields into a string.
Example with an input structure s with 2 fields :
s.age = '33'
s....
4 years 前
已解决
Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example,
ord(1)='1st'
ord(2)=...