해결됨


Inner product of two vectors
Find the inner product of two vectors.

약 2년 전

해결됨


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

약 2년 전

해결됨


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

약 2년 전

해결됨


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

약 2년 전

해결됨


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

약 2년 전

해결됨


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

약 2년 전

해결됨


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

약 2년 전

해결됨


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

약 2년 전

해결됨


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

약 2년 전

해결됨


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

약 2년 전

해결됨


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

약 2년 전

해결됨


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

약 2년 전

해결됨


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

약 2년 전

해결됨


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

약 2년 전

해결됨


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

약 2년 전

해결됨


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

약 2년 전

해결됨


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

약 2년 전

해결됨


Return area of square
Side of square=input=a Area=output=b

약 2년 전

해결됨


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

약 2년 전

해결됨


Check if integer is a prime number
Check if integer i is a prime number. Returns logical true '1' if it is.

약 2년 전

해결됨


Check if number is a square number
Test if integer i is a square number. Return logical true if it is.

약 2년 전

해결됨


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

약 2년 전

해결됨


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

약 2년 전

해결됨


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

약 2년 전

해결됨


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

약 2년 전

해결됨


05 - Vector Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

약 2년 전

해결됨


Repeat elements of a vector
Repeat each elements of a given vector according to their values. say x=[1,2,1,3] y=[1,2,2,1,3,3,3]

약 2년 전

해결됨


only input
Return the output without writing any code into the function.

2년 이상 전

해결됨


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

2년 이상 전

해결됨


Is my wife right?
Regardless of input, output the string 'yes'.

2년 이상 전

더로드