Draw the symbol '+'
Draw '+' in an x-by-x matrix (where x is odd and x >3) Example: x = 5 y = [0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 ...

Add the number of horizontal and vertical movements to each matrix element
Given n, create a square matrix and with element (1,1) = 1, add 1 to each element for each horitizonal and vertical movement. E...

Area of a regular hexagon
Given the length of a side of a regular hexagon, return its area rounded to two decimal places.

Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

Add two numbers
Given a and b, return the sum a+b in c.

what's my tax amount this year ?
given an annual salary x and a tax rate i calculate the amount that you have to pay.Example x = 70000; i=.10 y_correc...

Height of a 3D Pyramid
If a pyramid is made with one(1). What will be the height of the pyramid of square shaped base(n*n)? where input is n.

Pairwise column flip
Given matrix *M_in*, flip every pair of columns. So if *M_in* is 1 2 3 4 1 2 3 4 then *M_out* is 2 1 4 3 2 1 4 3 ...

Tribonacci Sequence
Generate the tribonacci sequence upto n

1年以上 前

Total resistance of a network of resistors in series and parallel
What is the total resistance of a network of resistors in series and in parallel? A matrix R contains the resistances (in Ohm) ...

1年以上 前

Find the summation, mean, median, mode and standard deviation of a given array.
An array is given. Find out the summation, mean, median, mode and standard deviation of a given array. If x=[1,2,2,3,3,3,4,4,4,...

1年以上 前

Total resistance of resistors in parallel
What is the total resistance of a number of resistors in parallel? A vector R contains the resistances (in Ohm) of n resistors,...

1年以上 前

Total resistance of resistors in series
What is the total resistance of a number of resistors in series? A vector R contains the resistances (in Ohm) of n resistors, w...

1年以上 前

Guess the Coefficients!
Given a polynomial _p_ known to have positive integer coefficients, deduce the values of the coefficients. For example: ...

1年以上 前

Summing Rows and Columns
Create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last...

1年以上 前

Draw 'P' !!!
Draw a n by n matrix 'P' using 0s and 1s. (n is odd and greater than 4) if n=5 , then the output will be [1 1 1 1 1 1 0 0 0...

1年以上 前

Find a Prime Number
Find a prime number from a vector Example: [2 51 8 65 19] a = 51

1年以上 前

A sequence of Ones
You are given number(s) with all digits - 1. Your answer will depend on the count of 1 in the given number, for example - x1...

1年以上 前

Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

1年以上 前

Mann-Kendall Correlation
Write a function that returns the <http://en.wikipedia.org/wiki/Kendall_tau_rank_correlation_coefficient Mann-Kendall> correlati...

1年以上 前

Find the slope

1年以上 前

Draw matrix 'Swiss flag'( Euro 2020)
Draw a x-by-x matrix 'Swiss flag' using '0' and '1'.(x is odd and bigger than 4) Example x=5 ...

2年弱 前

Draw a x-by-x matrix British flag (Euro 2020)
Draw a x-by-x matrix 'British flag' using '0' and '1'.(x is odd and bigger than 4) x = 5 answer = [0 0 1 0 0 ...

2年弱 前

remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

2年弱 前

Draw a x-by-x matrix 'Denmark flag'(Euro(2020)
Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

2年弱 前

Matrix Indexing
Given a matrix A and scalars r,c,i, find the product of two elements, with the first element located at row r and column c (doub...

2年弱 前

SAY 'OHYEAH'
Regardless of input, output the string 'OHYEAH'.

2年弱 前

Angular Velocity

2年弱 前

Period of a pendulum

2年弱 前

Upper case and lower case!

2年弱 前