Gelöst


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

fast 12 Jahre vor

Gelöst


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

fast 12 Jahre vor

Gelöst


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

fast 12 Jahre vor

Gelöst


Nilpotent matrix
Check if matrix A is <http://mathworks.com/ nilpotent>.

fast 12 Jahre vor

Gelöst


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

fast 12 Jahre vor

Gelöst


Convert a vector of Integers into a matrix of binaries
Convert a vector of positive integers into a matrix containing their binary representation. Each column of the output contains t...

fast 12 Jahre vor

Gelöst


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


Create the following sequence : 0 1 1 4 9 25 64 169 ...
The sequence 0, 1, 1, 4, 9, 25, 64, 169, ... represents the square of the sequence of Fibonacci numbers. Let n repres...

fast 12 Jahre vor

Gelöst


Find the square of the sum of the digits of a number
If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

fast 12 Jahre vor

Gelöst


Reverse a matrix
Its simple. You have to reverse a given matrix.

fast 12 Jahre vor

Gelöst


Concatenate two strings
Its very easy. Just concatenate two strings.

fast 12 Jahre vor

Gelöst


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

fast 12 Jahre vor

Gelöst


Math Test
Your teacher gave you 15 minutes and 25 problems. In how much time can each Problem be solved, before time flies away? Writ...

etwa 12 Jahre vor

Gelöst


Find supported functions
Given a function name, return true if that function is supported by the toolboxes that are installed with MATLAB on this machine...

etwa 12 Jahre vor

Gelöst


Given a number find two variables
If the input is *x*, find *a* and *b* from the following equation: *x = a*2^b*. Hint: *b* is an integer while *x* and *a* ar...

etwa 12 Jahre 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...

etwa 12 Jahre vor

Gelöst


Compute hamming distance between two binary vectors represented using lists of 1-byte numbers
Let v and u be vectors of the same size with 8-bit integers (0-255). We want to compute the number of bits where those vectors d...

etwa 12 Jahre vor

Gelöst


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

etwa 12 Jahre vor

Gelöst


Equidistant numbers containing certain value in an interval
Given a lower and upper bound of an interval, distance between numbers, and one particular number from that interval, create an ...

etwa 12 Jahre vor

Gelöst


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

etwa 12 Jahre vor

Gelöst


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

etwa 12 Jahre vor

Gelöst


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

etwa 12 Jahre vor

Gelöst


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

etwa 12 Jahre vor

Gelöst


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

etwa 12 Jahre vor

Gelöst


Woodall number
Test whether the input is a Woodall number: <http://en.wikipedia.org/wiki/Woodall_number> _Please do not cheat by simply chec...

etwa 12 Jahre vor

Gelöst


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

etwa 12 Jahre vor

Gelöst


What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

etwa 12 Jahre vor

Mehr laden