Gelöst


the fly, the train, the second train, and their Zeno's paradox
*You have heard this one*: A train leaves station _A_ and travels with constant velocity _v1_. A second train leaves station _B_...

mehr als 12 Jahre vor

Gelöst


Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

mehr als 12 Jahre vor

Gelöst


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

mehr als 12 Jahre vor

Gelöst


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.

mehr als 12 Jahre vor

Gelöst


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

mehr als 12 Jahre vor

Gelöst


love is an n-letter word
Given a list of *N words*, return the *N-letter word* (choosing one letter from each word) with the property of having the least...

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

Gelöst


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

mehr als 12 Jahre vor

Gelöst


Fizz Buzz
Given an array of positive, non-zero, integers, return a cell array of strings the same size as the input, where each element in...

mehr als 12 Jahre vor

Gelöst


Find Rotated Substring
Given a string s1, find if a rotated version of s1 is present in a second string s2. For example, rotated version of some str...

mehr als 12 Jahre vor

Gelöst


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

mehr als 12 Jahre vor

Gelöst


Find indices of multiple minima in a vector
I have a vector, say: x= [ 1 5 6 2 6 1 3 5 1] Now I would like to get the index of the minimum values in this vector. When...

mehr als 12 Jahre vor

Gelöst


Return the Nth Output from an Input Command
*Description* Given _F_, a cell array whose first element is a function handle and subsequent elements are arguments, return ...

mehr als 12 Jahre vor

Gelöst


Mimic foldl in functional programming
Mimic the higher-order function |foldl| ( <http://en.wikipedia.org/wiki/Fold_%28higher-order_function%29 Wikipedia:Fold (higher-...

mehr als 12 Jahre vor

Gelöst


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

mehr als 12 Jahre vor

Gelöst


letter yes yes & letter no no
Split a string into two strings, first string has all alphabetic letters, next string has all the rest, keep the order please, o...

mehr als 12 Jahre vor

Gelöst


Create a dictionary
The goal is to write a function that returns a dictionary from a list of words or phrases and their definitions. Here is an exam...

mehr als 12 Jahre vor

Gelöst


Person of interest?
given a person_of_interest, what is his_name?

mehr als 12 Jahre vor

Gelöst


Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

mehr als 12 Jahre vor

Gelöst


Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

mehr als 12 Jahre vor

Gelöst


commutative?
Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.

mehr als 12 Jahre vor

Gelöst


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

mehr als 12 Jahre vor

Gelöst


wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...

mehr als 12 Jahre vor

Gelöst


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

Gelöst


Infernal Recursion
Consider the recursion relation: x_n = (x_(n-1)*x_(n-2))^k Given x_1, x_2, and k, x_n can be found by this definition. Wr...

mehr als 12 Jahre vor

Gelöst


Specific toolboxes
Given a string that is the name of a MATLAB toolbox, return true if it is available on the Cody solvers evaluation system, false...

mehr als 12 Jahre vor

Gelöst


Function Sniffer
* Given a string, * find out which built-in functions are present, * output a simple string, * that has sorted and unique ...

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

Gelöst


Cody Computer Part 1 - Guess the system font used by uipanel
list = listfonts return the list of available system fonts. Can you guess which font is used for uipanel on the CODY computer...

mehr als 12 Jahre vor

Mehr laden