Gelöst


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

mehr als ein Jahr vor

Gelöst


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

mehr als ein Jahr vor

Gelöst


swap sign sum & multiply castles
It is an easy problem, if you know the answer. Given a square matrix of NxN ordinary numbers. Initially place N identical indi...

mehr als ein Jahr vor

Gelöst


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

mehr als ein Jahr vor

Gelöst


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

mehr als ein Jahr vor

Gelöst


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

mehr als ein Jahr vor

Gelöst


Form a square matrix from four square sub-matrices
Create a square matrix, y, from 4 square sub-matrices that will be constructed (x1, x2, x3, x4): y = [x1 x2; x3 x4]; ...

mehr als ein Jahr vor

Gelöst


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

mehr als ein Jahr vor

Gelöst


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

mehr als ein Jahr vor

Gelöst


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

mehr als ein Jahr vor

Gelöst


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

mehr als ein Jahr vor

Gelöst


Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

mehr als ein Jahr vor

Gelöst


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

mehr als ein Jahr vor

Gelöst


Find the minimum element of the matrix
Example: If x = [3 9; 5 2] then y = 2

mehr als ein Jahr vor

Gelöst


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

mehr als ein Jahr vor

Gelöst


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

mehr als ein Jahr vor

Gelöst


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

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


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

mehr als ein Jahr vor

Gelöst


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

mehr als ein Jahr vor

Gelöst


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

mehr als ein Jahr vor

Gelöst


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

mehr als ein Jahr vor

Gelöst


find the mean of all elements in a matrix
given a matrix, just find the mean of all elements in the matrix

mehr als ein Jahr vor

Gelöst


Determine whether the input is divisible by 3 as well as 5
If the input is divisible by 3 as well as 5 then the output should be 'true' otherwise 'false'

mehr als ein Jahr vor

Gelöst


Find remainder when x is divided by 3
Find remainder when x is divided by 3

mehr als ein Jahr vor

Gelöst


multiply an array by its position number
You have given an array. Multiply an array by its position number

mehr als ein Jahr vor

Gelöst


What day is it?
Tell me what day is it. Return the full name of the day of the week as a string. e.g. It's June 12th 2014, so your function s...

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

mehr als ein Jahr vor

Gelöst


Make an identity matrix whose diagonal elements are 1:n
For a given input n, make an n by n identity matrix that contains the elements 1:n along its diagonal. For example, if input=5: ...

mehr als ein Jahr vor

Mehr laden