Risolto


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

circa 13 anni fa

Risolto


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

circa 13 anni fa

Risolto


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

circa 13 anni fa

Risolto


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

circa 13 anni fa

Risolto


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

circa 13 anni fa

Risolto


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

circa 13 anni fa

Risolto


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

circa 13 anni fa

Risolto


does it touch ?
given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

circa 13 anni fa

Risolto


hanoi towers II
with 3 rods (1,2 & 3), the goal is to move a tower of n disks from rod #1 to rod #3. You can move disks only one by one, on the...

circa 13 anni fa

Risolto


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

circa 13 anni fa

Risolto


Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

circa 13 anni fa

Risolto


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

circa 13 anni fa

Risolto


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

circa 13 anni fa

Risolto


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

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

circa 13 anni fa

Risolto


Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

circa 13 anni fa

Risolto


Woodall number
Test whether the input is a Woodall number: <http://en.wikipedia.org/wiki/Woodall_number> _Please do not cheat by simply chec...

circa 13 anni fa

Risolto


Figurate number triangle
Check whether the input matrix is a figurate number triangle: <http://mathworld.wolfram.com/FigurateNumberTriangle.html>

circa 13 anni fa

Risolto


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

circa 13 anni fa

Risolto


Equidistant numbers containing certain value in an interval
Given a lower and upper bound of an interval, distance between numbers, and one particular number from that interval, create an ...

circa 13 anni fa

Risolto


Tune your guitar
Given an input string with the scientific pitch notation for standard tuning ( <http://en.wikipedia.org/wiki/Guitar_tunings#Stan...

circa 13 anni fa

Risolto


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

circa 13 anni fa

Risolto


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

circa 13 anni fa

Risolto


Least common multiple of many numbers
1:6 -> 60

circa 13 anni fa

Risolto


Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

circa 13 anni fa

Risolto


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

circa 13 anni fa

Risolto


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

circa 13 anni fa

Risolto


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

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

circa 13 anni fa

Risolto


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

circa 13 anni fa

Carica altro