A résolu


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.

presque 12 ans il y a

A résolu


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

presque 12 ans il y a

A résolu


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

presque 12 ans il y a

A résolu


DC chopper
Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

presque 12 ans il y a

A résolu


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

presque 12 ans il y a

A résolu


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

presque 12 ans il y a

A résolu


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

presque 12 ans il y a

A résolu


Cumulative probability of finding an unlikely combination
This is a supplemental problem to the <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition CryptoMath> ...

presque 12 ans il y a

A résolu


swap sign sum & multiply castles
* It is an easy problem, if you know the answer. * Given a square matrix of NxN ordinary numbers. * Initially place N identi...

presque 12 ans il y a

A résolu


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

presque 12 ans il y a

A résolu


Find the largest value in the 3D matrix
Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

presque 12 ans il y a

A résolu


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

presque 12 ans il y a

A résolu


Hackathon: the beginnings
I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

presque 12 ans il y a

A résolu


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

presque 12 ans il y a

A résolu


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

presque 12 ans il y a

A résolu


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

presque 12 ans il y a

A résolu


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

presque 12 ans il y a

A résolu


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

presque 12 ans il y a

A résolu


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

presque 12 ans il y a

A résolu


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

presque 12 ans il y a

A résolu


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

presque 12 ans il y a

A résolu


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

presque 12 ans il y a

A résolu


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

presque 12 ans il y a

A résolu


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

presque 12 ans il y a

A résolu


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

presque 12 ans il y a

A résolu


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

presque 12 ans il y a

A résolu


Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

presque 12 ans il y a

A résolu


Lose control
Remove all characters that are below space in ASCII value.

presque 12 ans il y a

A résolu


Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

presque 12 ans il y a

A résolu


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

presque 12 ans il y a

Charger plus