Gelöst


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

mehr als 11 Jahre vor

Gelöst


Rounding
Round 10.67 and make 'y' equal to that number.

mehr als 11 Jahre vor

Gelöst


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

mehr als 11 Jahre vor

Gelöst


Negative matrix
Change the sign of all elements in given matrix.

mehr als 11 Jahre vor

Gelöst


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

mehr als 11 Jahre vor

Gelöst


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

mehr als 11 Jahre 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 11 Jahre vor

Gelöst


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

mehr als 11 Jahre vor

Gelöst


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

mehr als 11 Jahre 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...

mehr als 11 Jahre vor

Gelöst


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

mehr als 11 Jahre vor

Gelöst


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

mehr als 11 Jahre vor

Gelöst


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

mehr als 11 Jahre vor

Gelöst


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

mehr als 11 Jahre vor

Gelöst


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


Add two numbers
Add two numbers (For beginners)

mehr als 11 Jahre vor

Gelöst


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

mehr als 11 Jahre vor

Gelöst


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

mehr als 11 Jahre vor

Gelöst


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

mehr als 11 Jahre vor

Gelöst


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

mehr als 11 Jahre vor

Gelöst


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

mehr als 11 Jahre vor

Gelöst


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

mehr als 11 Jahre vor

Gelöst


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

mehr als 11 Jahre vor

Gelöst


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

mehr als 11 Jahre vor

Gelöst


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

mehr als 11 Jahre vor

Gelöst


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

mehr als 11 Jahre vor

Mehr laden