A résolu


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

plus de 10 ans il y a

A résolu


Top of the Hour : Return from your routine within 1 second of the hour
*Top of the Hour* Submit your routine such that it returns to Cody after the hour and within 1 second of the hour. The tes...

plus de 10 ans il y a

A résolu


Equal to their cube
Tell me three real numbers that are equal to their cubes?

plus de 10 ans il y a

A résolu


Subtract two positive numbers
Given a and b as a string, return b-a without using string to number conversion functions. a and b must to be a same size and b ...

plus de 10 ans il y a

A résolu


Knights and Knaves (part 3)
_This is a Matlab adaptation of the_ <http://en.wikipedia.org/wiki/Knights_and_Knaves Knives and Knaves> _logical puzzles_. ...

plus de 10 ans il y a

A résolu


Knights and Knaves (part 2)
_This is a Matlab adaptation of the_ <http://en.wikipedia.org/wiki/Knights_and_Knaves Knives and Knaves> _logical puzzles_. ...

plus de 10 ans il y a

A résolu


Knights and Knaves (part 1)
This is a Matlab adaptation of the <http://en.wikipedia.org/wiki/Knights_and_Knaves Knights and Knaves> logical puzzles. You ...

plus de 10 ans il y a

A résolu


Make a KITT-scanner on the command line
Did you know that you can actually remove characters from the command-line window? Just send a 'backspace' character to the outp...

plus de 10 ans il y a

A résolu


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

plus de 10 ans il y a

A résolu


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

plus de 10 ans il y a

A résolu


Sort (high on middle, low on ends)
Sort the vector of numbers in order low-high-low. Even numbers appear in ascending order on the left and odd numbers appear in d...

plus de 10 ans il y a

A résolu


I've got the power! (Inspired by Project Euler problem 29)
Consider all integer combinations of a^b and b^a for the integer values 2 ≤ a ≤ 4 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16,...

plus de 10 ans il y a

A résolu


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

plus de 10 ans il y a

A résolu


You LOVES Matlab 41%
Given two strings, determine the percentage that one loves the other in the following way: YOU LOVES MATLAB there is 1 '...

plus de 10 ans il y a

A résolu


How many days does the cat take to climb out of the hole?
A cat accidentally falls down a hole with sloping but rough sides. It can climb out of the hole of height h metres, but for ever...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

plus de 10 ans il y a

A résolu


Ripping numbers apart!
So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

presque 11 ans il y a

A résolu


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

presque 11 ans il y a

A résolu


Numeric array to cell array of strings (easy)
Given a numeric array (A) and a 1xk cell array of strings (C), return a cell array (B) that is the same size as A and in which e...

presque 11 ans il y a

A résolu


Factorial !
Calculate the factorial of a non-negative integer without using the built in function *factorial*

presque 11 ans il y a

A résolu


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

presque 11 ans il y a

A résolu


Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...

presque 11 ans il y a

A résolu


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

presque 11 ans il y a

A résolu


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

presque 11 ans il y a

A résolu


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

presque 11 ans il y a

A résolu


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x=123045; x_vec=[1 2 3 0 4 5]; I happened upon a trick to do ...

presque 11 ans il y a

A résolu


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

presque 11 ans il y a

A résolu


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

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

Charger plus