A résolu


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

3 mois il y a

A résolu


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]

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


Converts numbers into characters
Converts numbers into characters

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


to the 2 all elements
to the 2 all elements

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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?

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


Draw a '0' in a one matrix!

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

Charger plus