Gelöst


特定の値がベクトル内に含まれているかを確認するコードを書こう
ベクトル b にあるスカラ値 a が含まれていれば出力として 1 を返し、含まれていなければ 0 を返すような関数を作成しましょう。 例: a = 3; b = [1,2,4]; スカラ値 3 はベクトル b に含まれていない...

mehr als 5 Jahre vor

Gelöst


Sum sum!!!
Sum the numbers from 1 to n

mehr als 5 Jahre vor

Gelöst


Area of square
Find the area of a square whose diagonal length is given as x.

mehr als 5 Jahre vor

Gelöst


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

mehr als 5 Jahre vor

Gelöst


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

mehr als 5 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: ...

mehr als 5 Jahre vor

Gelöst


Largest Prime Number
Given a matrix X, find the largest prime number in X.

mehr als 5 Jahre vor

Gelöst


Output a vector which is table of 9
Output a vector which is table of 9

mehr als 5 Jahre vor

Gelöst


Prime number removal
remove all prime numbers from the input e.g. input = 1 2 3 4 5 6 7 8 9 10 11 12 ...

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Display negative numbers
Given array,x, display all the negative numbers and display output as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

mehr als 5 Jahre vor

Gelöst


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

mehr als 5 Jahre vor

Gelöst


Determine the roots of a cubic equation
Given the coefficients a, b, c, and d of a cubic equation, a*x^3 + b*x^2 + c*x + d = 0, determine its roots.

mehr als 5 Jahre vor

Gelöst


Sum of cubes
Write a program to determine sum of cubes of first n odd numbers.

mehr als 5 Jahre vor

Gelöst


Conversion from hours to mili sec
Convert given input in hours to mili seconds

mehr als 5 Jahre vor

Gelöst


Average Grade
Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

mehr als 5 Jahre vor

Gelöst


Number of primes
Count the number of primes less than 'n'.

mehr als 5 Jahre vor

Gelöst


Remove the first, third and fifth rows of a matrix
Given a matrix x with at least five rows, return a matrix y that includes all rows of x except for th 1st, the 3rd and 5th. E...

mehr als 5 Jahre vor

Gelöst


Vertical matrix sort
Given a matrix x with n rows and m columns, return a matrix y with 2n rows and m columns, such that every column in x is sorted ...

mehr als 5 Jahre vor

Gelöst


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

mehr als 5 Jahre vor

Gelöst


How to calculate log?
There is a log that have base 5. How to calculate? log5(x)?

mehr als 5 Jahre vor

Gelöst


Convert degrees to radians
Given input in degrees, output to radians

mehr als 5 Jahre vor

Gelöst


Find x in provided equation!
x^2-2*x+1=0 This polynomial can be expressed by using each term's coefficients, such as [1 -2 1]. Using the polynomial ...

mehr als 5 Jahre vor

Gelöst


Find and replaces spaces from a input string with *
For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is ...

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

mehr als 5 Jahre vor

Gelöst


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

mehr als 5 Jahre vor

Gelöst


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

mehr als 5 Jahre vor

Gelöst


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

mehr als 5 Jahre vor

Gelöst


Perfect square.
Determine if the input is a perfect square or not. Example - If input is 25, return 1. If input is 17, return 0.

mehr als 5 Jahre vor

Mehr laden