Gelöst


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

etwa 6 Jahre vor

Gelöst


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

etwa 6 Jahre vor

Gelöst


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

etwa 6 Jahre vor

Gelöst


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

etwa 6 Jahre vor

Gelöst


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

etwa 6 Jahre vor

Gelöst


Area of a circle
Find the value for area of the circle if diameter is given

etwa 6 Jahre vor

Gelöst


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

etwa 6 Jahre vor

Gelöst


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

etwa 6 Jahre vor

Gelöst


prime test
find largest 2 digit prime number

etwa 6 Jahre vor

Gelöst


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

etwa 6 Jahre vor

Gelöst


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

etwa 6 Jahre vor

Gelöst


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

etwa 6 Jahre vor

Gelöst


Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

etwa 6 Jahre vor

Gelöst


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

etwa 6 Jahre vor

Gelöst


square root
Find the square root (y) of an input (x).

etwa 6 Jahre vor

Gelöst


factorial of a number x
Factorial of a number x

etwa 6 Jahre vor

Gelöst


Complex number
For complex number c=a+bi, write code that will add a and b together.

etwa 6 Jahre vor

Gelöst


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

etwa 6 Jahre vor

Gelöst


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

etwa 6 Jahre vor

Gelöst


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

etwa 6 Jahre vor

Gelöst


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

etwa 6 Jahre vor

Gelöst


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

etwa 6 Jahre vor

Gelöst


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

etwa 6 Jahre vor

Gelöst


Equal to their cube
Tell me three real numbers that are equal to their cubes?

etwa 6 Jahre vor

Gelöst


Calculate square and cube of number
Calculate square and cube of number x

etwa 6 Jahre vor

Gelöst


Positive Infinity
Round the array a towards positive infinity

etwa 6 Jahre vor

Gelöst


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

etwa 6 Jahre vor

Gelöst


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

etwa 6 Jahre vor

Gelöst


sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...

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

etwa 6 Jahre vor

Mehr laden