Risolto


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

quasi 14 anni fa

Risolto


Numerical Integration
Input * |x0|, a real number greater than 0 Output * |I|, a numerical estimate of the integral x0 / I...

quasi 14 anni fa

Risolto


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.

quasi 14 anni fa

Risolto


linear least squares fitting
Inputs: * |f|: cell-array of function handles * |x|: column vector of |x| values * |y|: column vector of |y| values, same l...

quasi 14 anni fa

Risolto


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

quasi 14 anni fa

Risolto


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

quasi 14 anni fa

Risolto


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

quasi 14 anni fa

Risolto


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

quasi 14 anni fa

Risolto


Go-style solver
Consider a variation of the game Go where one player has gone ahead and placed several pieces all at once. Assuming that the sec...

quasi 14 anni fa

Risolto


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

quasi 14 anni fa

Risolto


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

quasi 14 anni fa

Risolto


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

quasi 14 anni fa

Risolto


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

quasi 14 anni fa

Risolto


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

quasi 14 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 14 anni fa

Risolto


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

quasi 14 anni fa

Risolto


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

quasi 14 anni fa

Risolto


Volume difference between Ellipsoid and Sphere
Given an ellipsoid of semi principal axis (a,b,c) find the volume of the difference between this ellipsoid and the sphere with...

quasi 14 anni fa

Risolto


Compression: Encode and Decode
This Challenge is to compress an array created by randi(2^32-1,1000) and then decompress your data file. The first call will ...

quasi 14 anni fa

Risolto


Generate pi using logarithm
Generate pi using logarithm

quasi 14 anni fa

Risolto


USC Fall 2012 ACM: Rover Maze
This Challenge is to solve Question F, Martian Pits, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012 Cont...

quasi 14 anni fa

Risolto


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

quasi 14 anni fa

Risolto


Property dispute!
Two neighbors have rectangular plots of land A and B. The surveyors give you the coordinates of each. If they overlap, there is ...

quasi 14 anni fa

Risolto


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

quasi 14 anni fa

Risolto


Crossing to Kissing - Untangle the Lines
Turn lines that cross into lines that kiss. You will be given two lines that cross at some point. Your job is to untangle the...

quasi 14 anni fa

Risolto


String permutations on phone keyboard
Given a number such as 2639 return all possible string permutations using the phone-keyboard on <http://www.mathworks.com/matlab...

quasi 14 anni fa

Risolto


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

quasi 14 anni fa

Risolto


Raise Matrix to Power
For a given square matrix x and scalar a, find x^a without using '^' or 'mpower'.

quasi 14 anni fa

Risolto


Visualization of experimental data across a surface
Assume that you have taken data across the surface of a sample, for example sheet resistance. The data is stored in a Nx3 matri...

quasi 14 anni fa

Risolto


USC Fall 2012 ACM: Driving the Rover
This Challenge is to solve Question E, Driving the Rover, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012...

quasi 14 anni fa

Carica altro