Square a Number
Given an input x, return y, which is equal to the square of x.
約8年 前
解決済み
sum of first 'n' terms
Given n=10, find the sum of first 'n' terms
Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...
約8年 前
解決済み
Mode
Find the mode of the vector
Assumption: no vector is bimodal
Example 1: input=[1 2 3 4 4]; output=4
Example 2: input=[7...
約8年 前
解決済み
Flipping
Write code that can reverse the vector without using any sort of loop.
Example
Given the input vector
A = [ 1 2 3 4 5...
約8年 前
解決済み
Area of a circle
Given the radius x, y would be the area of a circle.
Pi = 3.1416
約8年 前
解決済み
Specific toolboxes
Given a string that is the name of a MATLAB toolbox, return true if it is available on the Cody solvers evaluation system, false...
約8年 前
解決済み
random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours
for example create_pic(5,5) gives us a 3d matrix.
...
約8年 前
解決済み
All capital?
Are all the letters in the input string capital letters?
Examples:
'MNOP' -> 1
'MN0P' -> 0