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 9 ans il y a

A résolu


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

presque 9 ans il y a

A résolu


Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

presque 9 ans il y a

A résolu


reverse string
input='rama' output='amar'

presque 9 ans il y a

A résolu


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

presque 9 ans il y a

A résolu


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

presque 9 ans il y a

A résolu


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

presque 9 ans il y a

A résolu


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

presque 9 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 9 ans il y a

A résolu


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

presque 9 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 9 ans il y a

A résolu


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

presque 9 ans il y a

A résolu


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

presque 9 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 9 ans il y a

A résolu


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

presque 9 ans il y a

A résolu


length of a vector
Find twice the length of a given vector.

presque 9 ans il y a

A résolu


letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

presque 9 ans il y a

A résolu


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

presque 9 ans il y a

A résolu


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

presque 9 ans il y a

A résolu


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

presque 9 ans il y a

A résolu


Spot the First Occurrence of 5
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

presque 9 ans il y a

A résolu


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

presque 9 ans il y a

A résolu


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

presque 9 ans il y a

A résolu


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

presque 9 ans il y a

A résolu


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

presque 9 ans il y a

A résolu


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

presque 9 ans il y a

A résolu


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

presque 9 ans il y a

A résolu


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

presque 9 ans il y a

A résolu


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

presque 9 ans il y a

A résolu


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

presque 9 ans il y a

Charger plus