Resuelto


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

6 meses hace

Resuelto


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

6 meses hace

Resuelto


Eliminate Polysyllabics: Long live short words!
Given a string s1, return s2 in which all the words with more than one syllable have been removed. To make things simple, we ...

6 meses hace

Resuelto


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

6 meses hace

Resuelto


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

6 meses hace

Resuelto


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

6 meses hace

Resuelto


Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...

6 meses hace

Resuelto


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

6 meses hace

Resuelto


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

6 meses hace

Resuelto


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

6 meses hace

Resuelto


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

6 meses hace

Resuelto


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

6 meses hace

Resuelto


Breaking up a chocolate bar
You've got a chocolate bar of size , and you want to break it up into bite-sized () pieces. How many steps are required to do th...

8 meses hace

Resuelto


Division
Given two numbers a and b divide them a/b

8 meses hace

Resuelto


Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

8 meses hace

Resuelto


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

8 meses hace

Resuelto


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

10 meses hace

Resuelto


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

10 meses hace

Resuelto


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

10 meses hace

Resuelto


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

10 meses hace

Resuelto


Generate pi using logarithm
Generate pi using logarithm

10 meses hace

Resuelto


Product of Array
Given an array of numbers. Get the product of the array.

10 meses hace

Resuelto


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

10 meses hace

Resuelto


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

10 meses hace

Resuelto


Find out total non zero element of matrix
Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...

10 meses hace

Resuelto


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

10 meses hace

Resuelto


ASCii Code
Using Matlab get the ASCii for '?'

10 meses hace

Resuelto


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

10 meses hace

Resuelto


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

10 meses hace

Resuelto


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

10 meses hace

Cargar más