解決済み


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

7年以上 前

解決済み


The Matrix Construction
Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

7年以上 前

解決済み


Create a block diagonal matrix
A block diagonal matrix is a square matrix that can be written as A = [a 0 0 0 0 b 0 0 0 0 c 0 ...

7年以上 前

解決済み


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

7年以上 前

解決済み


Gauss Eliminate 2-by-2 example
Use forward elimination to make the coefficient matrix, A, an upper triangular matrix, and then solve using back substitution, f...

7年以上 前

解決済み


how to concatenate matrices
What is the name of the function used to create a matrix C form two matrices A and B, using the syntax: C = [A B]; Outpu...

7年以上 前

解決済み


balance vector
Given a non-empty vector x with integer elements. x shall be called balance vector if one can split the elements of x into two g...

7年以上 前

解決済み


0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...

7年以上 前

解決済み


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

7年以上 前

解決済み


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

7年以上 前

解決済み


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

7年以上 前

解決済み


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

7年以上 前

解決済み


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

7年以上 前

解決済み


prime test 2
enter the only non prime,non composite number

7年以上 前

解決済み


true or false
if the matrix has a zero, return true. else, return false

7年以上 前

解決済み


Radians to Degrees
Convert radians to degrees.

7年以上 前

解決済み


Initialize a Natural Number matrix.
Given length of matrix initialize a matrix consisting of natural numbers from 1 to n: n = 10; x = [ 1 2 3 4 5 6 7 8 9 10]; ...

7年以上 前

解決済み


Find remainder when x is divided by 3
Find remainder when x is divided by 3

7年以上 前

解決済み


row removal
Remove the nth row from input matrix M and return the resulting matrix in output N.

7年以上 前

解決済み


modulus of a number
find the modulus of a given number

7年以上 前

解決済み


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

7年以上 前

解決済み


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

7年以上 前

解決済み


Degrees to Radian
Convert degrees to radians

7年以上 前

解決済み


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

7年以上 前

解決済み


Sum positive elements of matrix.
Calculate sum of positive elements of the matrix.

7年以上 前

解決済み


Find hen's weight.
If hen weights x kilos on two legs, how much does it weights on one leg? Output the result.

7年以上 前

解決済み


MPS to MPH
Given the speed in miles per second, find the speed in miles per hour.

7年以上 前

解決済み


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

7年以上 前

解決済み


ASCII Birthday Cake
Given an age and a name, give draw an ASCII birthday cake. For example, given the name "CODY" and the age 5, return a string wit...

7年以上 前

解決済み


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

7年以上 前

さらに読み込む