Gelöst


Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

9 Monate vor

Gelöst


Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

9 Monate vor

Gelöst


Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

9 Monate vor

Gelöst


Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

9 Monate vor

Gelöst


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

9 Monate vor

Gelöst


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

9 Monate vor

Gelöst


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

9 Monate vor

Gelöst


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

9 Monate vor

Gelöst


Create a vector
Create a vector from 0 to n by intervals of 2.

9 Monate vor

Gelöst


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

9 Monate vor

Gelöst


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

9 Monate vor

Gelöst


Converts numbers into characters
Converts numbers into characters

10 Monate vor

Gelöst


Find the max element of the array
Find the max element of the array

10 Monate vor

Gelöst


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

10 Monate vor

Gelöst


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

10 Monate vor

Gelöst


to the 2 all elements
to the 2 all elements

10 Monate vor

Gelöst


the average value of the elements
Calculate the average value of the elements in the array

10 Monate vor

Gelöst


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

10 Monate vor

Gelöst


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

10 Monate vor

Gelöst


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

10 Monate vor

Gelöst


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

10 Monate vor

Gelöst


Double all elements in the array
Duplicate all elements in the array

10 Monate vor

Gelöst


calculate the length of matrix
input 1 array, calculate the length

10 Monate vor

Gelöst


Draw a '0' in a one matrix!

10 Monate vor

Gelöst


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

10 Monate vor

Gelöst


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

10 Monate vor

Gelöst


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

10 Monate vor

Gelöst


Find max
Find the maximum value of a given vector or matrix.

10 Monate vor

Gelöst


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

10 Monate vor

Gelöst


Inner product of two vectors
Find the inner product of two vectors.

10 Monate vor

Mehr laden