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) ...
5年以上 前
解決済み
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], ...
5年以上 前
解決済み
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...
5年以上 前
解決済み
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):
...
5年以上 前
解決済み
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...
5年以上 前
解決済み
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...
5年以上 前
解決済み
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...
5年以上 前
解決済み
Space Saver
Remove all characters that are below a space in ASCII value.
5年以上 前
解決済み
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:
* ...
5年以上 前
解決済み
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.
...
5年以上 前
解決済み
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...
5年以上 前
解決済み
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....
5年以上 前
解決済み
Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example,
ord(1)='1st'
ord(2)=...