Gelöst


newRMS
find root mean square of a signal x in less time than the test code and accurate to six places.

mehr als 14 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 14 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 14 Jahre vor

Gelöst


Minefield Sonar
*Background* In mine-hunting games (e.g. Microsoft Minesweeper), the user is provided with a covered grid that, upon a left c...

mehr als 14 Jahre vor

Gelöst


fly fly away
A fly moves following a predefined sequence of discrete jumps (defined by the vectors _dx_ and _dy_) repeating the same sequence...

mehr als 14 Jahre vor

Gelöst


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

mehr als 14 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 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


Einsteinium-253 decay
Radioactive Einsteinium-253 has a half-life of 1,768,608 seconds. Given 1000mg of Einsteinium-253 at t=0 days, how much is lef...

mehr als 14 Jahre vor

Gelöst


Column norms of a matrix
Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

mehr als 14 Jahre vor

Gelöst


Poker Series 02: isQuads
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is to...

mehr als 14 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 14 Jahre vor

Gelöst


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

mehr als 14 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 14 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 14 Jahre vor

Gelöst


Trickier Timing
You solution should return control to main program only when the current time ends in either a 5 or 0 (e.g. the current seconds ...

mehr als 14 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 14 Jahre vor

Gelöst


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

mehr als 14 Jahre vor

Gelöst


Filter values in a vector
Cody often benefits from a functional style of programming. For example, your score is often better when you compose multiple fu...

mehr als 14 Jahre vor

Gelöst


Double Deal
*Description* Given an input vector _v_, return the first element as the first output, the second element as the second outpu...

mehr als 14 Jahre vor

Gelöst


Back to basics 2 - Function Path
Covering some basic topics I haven't seen elsewhere on Cody. Given a string that is the name of a MATLAB function, return a s...

mehr als 14 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 14 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 14 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 14 Jahre vor

Gelöst


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

mehr als 14 Jahre vor

Gelöst


Eight Queens Solution Checker
Write a function to verify whether an arrangement of queens on a chessboard is a valid solution to the classic <http://en.wikipe...

mehr als 14 Jahre vor

Gelöst


N-Cards Problem
You have a deck of _N_ cards numbered in order from 1 to _N_. You discard the top card (card 1) and place the next card (card 2)...

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Mehr laden