count upper and lower case characters
In a given input string, count and return the number of upper and lower case characters as u and l respectively.
For example:...
約8年 前
解決済み
Find the Pattern
Find the pattern between input and output.
Write a function that gives the correct output for any input.
*Hint: magic*
Large Sum (inspired by Project Euler 13)
Your function will be provided an arbitrary number of numbers of arbitrary sizes as a cell array of strings. Some numbers will b...
Primes Checker
Given variable inputs
Check if they are prime numbers
約8年 前
解決済み
Check availability of a number in an array
An array is given A=[1 2 3 4 5 7 8 9 10].
Find whether the number n is present in given array or not.
If the number n is prese...
約8年 前
解決済み
Add the positive numbers
Add only the positive numbers of x
example:
x = [-2 -1 0 1 2 3]
the positive numbers are: 1 2 3, so their sum is 6
Sum of unique multiples of 3 and 5
If we list all the natural numbers up to 15 that are multiples of 3 or 5, we get 3, 5, 6, 9, 10, 12 and 15. The sum of these mul...
8年以上 前
解決済み
Shuffle
Shuffle a vector by breaking it up to segments of |n| elements, and rearranging them in a reversed order.
For example, the ve...
Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...
8年以上 前
解決済み
Solve expression I
Solve expression (1+sin(x))/cos(x)+cos(x)/(1+sin(x)) for given vector x.
8年以上 前
解決済み
The maximum sum of squares (testing)
Create a function file with an input maxval to determine the maximum number of terms for the series 1^2 + 2^2 + 3^2 + ... such t...
8年以上 前
解決済み
true or false
if the matrix has a zero, return true. else, return false
8年以上 前
解決済み
Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.
Capitalized string operations
Convert the input sentence to upper case and replace all vowels with an underscore ('_')
8年以上 前
解決済み
generate capital english alphabets
Based on the numeric input 'n', generate the capital english alphabet starting from A till the english alphabet at the 'n'th pos...