Solved


Check if is a square
Given four coordinates, write a function to check if they form a square on the XY plane.

5 years ago

Solved


Approximate the inverse tangent by power series
Given values b (where abs(b)<=1) and n (polynomial order), write a function that calculates atan(b) by using power series.

5 years ago

Solved


Power supply: 230V to 115V
The problem is simple: we have a wall outlet which supplies 230V and an apparatus that requires 115V. Software is always chea...

5 years ago

Solved


Alternate list of elements
Write a function that combines two lists by alternating the elements, e.g. ['a','b','c'], ['1','2','3'] → 'a1b2c3'.

5 years ago

Solved


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

5 years ago

Solved


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

5 years ago

Solved


Return median of a matrix
Compute median of a matrix of any dimension. Exclude the NaNs if any.

5 years ago

Solved


function to compute root mean square of first nn positive odd integers
Write a function called odd_rms that returns orms, which is the square root of the mean of the squares of the first nn positive ...

5 years ago

Solved


Raise each element to the power of its index in a matrix
In a matrix, A = [1,2;3,4] raise the power of each element like: 1^1+2^3+3^2+4^4 and add it all to produce the result 274

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


The average of the second largest values
Given a matrix, find the average of the second largest values in each row. The same value does not exist on a row. Example: ...

5 years ago

Solved


replace empty matrices with '[]'
for example a=1;a(:,1)=[]; returns a = Empty matrix: 1-by-0 use this as the input,and the output should be '[]...

5 years ago

Solved


Capitalized string operations
Convert the input sentence to upper case and replace all vowels with an underscore ('_')

5 years ago

Solved


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

5 years ago

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

5 years ago

Solved


execute the declaration in strings and return value
execute the commands in strings and return value input='a=23' output=23

5 years ago

Solved


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

5 years ago

Solved


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

5 years ago

Solved


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

5 years ago

Solved


Alternately upper-lower case
Modify the string to alternate between upper and lower case. For example, s='achyuta' output='AcHyUtA'

5 years ago

Solved


most frequent character
Obtain the most frequent character. For example, s='balaram'; output='a'; If there is a tie between letters, return t...

5 years ago

Solved


Leaking?
Graham's law states that the rate of effusion of a gas is inversely proportional to the square root of its molecular weight. A b...

5 years ago

Solved


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

5 years ago

Solved


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

5 years ago

Solved


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

5 years ago

Solved


Basic Addition

5 years ago

Solved


Reverse Calculator
Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

5 years ago

Load more