Risolto


Flag largest magnitude swings as they occur
You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching thr...

quasi 11 anni fa

Risolto


How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

quasi 11 anni fa

Risolto


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

quasi 11 anni fa

Risolto


Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

quasi 11 anni fa

Risolto


Converting numbers back from extended form
Thanks for all the help you guys gave me on writing out the numbers in extended form in <http://www.mathworks.com/matlabcentral/...

quasi 11 anni fa

Risolto


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

quasi 11 anni fa

Risolto


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


Calculate the Levenshtein distance between two strings
This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

quasi 11 anni fa

Risolto


Mandelbrot Numbers
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

quasi 11 anni fa

Risolto


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

quasi 11 anni fa

Risolto


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

quasi 11 anni fa

Risolto


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


Return area of square
Side of square=input=a Area=output=b

quasi 11 anni fa

Risolto


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

quasi 11 anni fa

Risolto


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.

quasi 11 anni fa

Risolto


Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...

quasi 11 anni fa

Risolto


Given two strings, find the maximum overlap
Given two strings s1 and s2, create a new string s3 which is as short as possible and contains both strings. If s1 = [1 2...

quasi 11 anni fa

Problema


Friday the 13th
According to superstition, lots of unpleasant stuff happens on Friday the 13th, so you might like to find the next occurence of ...

quasi 11 anni fa | 2 | 48 risolutori

Risolto


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

quasi 11 anni fa

Risolto


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

quasi 11 anni fa

Risolto


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

quasi 11 anni fa

Risolto


Celcius to Kelvin
Convert Celsius degrees to Kelvin temperature.

quasi 11 anni fa

Risolto


kmph to mps
convert kilometer per hour to meter per second

quasi 11 anni fa

Risolto


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

quasi 11 anni fa

Risolto


pressure to dB?
given x ratio of pressure, find corresponding y dB

quasi 11 anni fa

Risolto


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

quasi 11 anni fa

Carica altro