Gelöst


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

mehr als ein Jahr vor

Gelöst


Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...

mehr als ein Jahr vor

Gelöst


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

mehr als ein Jahr vor

Gelöst


find whether it is prime or not
For a given number find if its prime

mehr als ein Jahr vor

Gelöst


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

mehr als ein Jahr vor

Gelöst


Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

mehr als ein Jahr vor

Gelöst


Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

mehr als ein Jahr vor

Gelöst


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

mehr als ein Jahr vor

Gelöst


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

mehr als ein Jahr vor

Gelöst


Square a Number
Given an input x, return y, which is equal to the square of x.

mehr als ein Jahr vor

Gelöst


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

mehr als ein Jahr vor

Gelöst


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

mehr als ein Jahr vor

Gelöst


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

mehr als ein Jahr vor

Gelöst


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

mehr als ein Jahr vor

Gelöst


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

mehr als ein Jahr vor

Gelöst


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

mehr als ein Jahr vor

Gelöst


Remove and Sort
Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

mehr als ein Jahr vor

Gelöst


Remove the Zero
Given an array n, remove all zeros

mehr als ein Jahr vor

Gelöst


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

mehr als ein Jahr vor

Gelöst


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

mehr als ein Jahr vor

Gelöst


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

mehr als ein Jahr vor

Mehr laden