Gelöst


Calculate the base-10 logarithm of a number
Calculate the logarithm of number x

etwa ein Jahr vor

Gelöst


Determine if a row vector has NaN
Determine if a row vector x has NaN

etwa ein Jahr vor

Gelöst


factorial of a number x
Factorial of a number x

etwa ein Jahr vor

Gelöst


Juros Simples
Faça uma função que calcule o montagem de um investimento com juros simples que receba como argumentos o capital inicial C, a ta...

etwa ein Jahr vor

Gelöst


Calories in a slice of pizza?
The total calories C in a pizza is printed on its box. You know the angle A (degrees) of the slice you placed on your plate. Ple...

etwa ein Jahr vor

Gelöst


Energy of a photon
&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883 Given the frequency F of a photon in giga hertz. Find energy E of this photon...

etwa ein Jahr vor

Gelöst


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

etwa ein Jahr vor

Gelöst


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

etwa ein Jahr 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...

etwa ein Jahr vor

Gelöst


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

etwa ein Jahr vor

Gelöst


compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...

etwa ein Jahr vor

Gelöst


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

etwa ein Jahr vor

Gelöst


remove single elements
Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as th...

etwa ein Jahr vor

Gelöst


calculate the day of the year from a date string.
'09-Oct-2016' is the 283rd day of the year. So doy = dayoftheyear('09-Oct-2016') should return doy = 283

etwa ein Jahr vor

Gelöst


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

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

etwa ein Jahr vor

Gelöst


Solve the matrix equation AXB + X + C = 0 for X
Let A, B, and C be square matrices of equal size, and let the matrix X be defined by the matrix equation A * X * B + X + ...

etwa ein Jahr vor

Gelöst


Conditional transpose
You're given two vectors of the same length, x and y, which might be row or a column vectors. Your task is to ensure that y has ...

etwa ein Jahr vor

Gelöst


Breaking up a chocolate bar
You've got a chocolate bar of size , and you want to break it up into bite-sized () pieces. How many steps are required to do th...

etwa ein Jahr vor

Gelöst


P(girl likes you | she smiled at you)
Compute the probability Given the input probabilities

etwa ein Jahr vor

Gelöst


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

etwa ein Jahr vor

Gelöst


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

etwa ein Jahr vor

Gelöst


give nth decimal place of pi
max 15th place after the decimal point is ok for now

etwa ein Jahr vor

Gelöst


convert?
* Given a string containing a number followed by pounds or kgs, for example: * 'Billy lost 22 pounds in four weeks.' * 'Maria ...

etwa ein Jahr vor

Gelöst


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

etwa ein Jahr vor

Gelöst


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

etwa ein Jahr vor

Gelöst


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

etwa ein Jahr vor

Gelöst


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

etwa ein Jahr vor

Mehr laden