Risolto


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

oltre 8 anni fa

Risolto


Model a falling body
An object is falling freely from a height of 22 meters under the force of gravity. <<http://blogs.mathworks.com/images/seth/c...

oltre 8 anni fa

Risolto


Polynomial Evaluation
Create a routine that takes a list of coefficients of a polynomial in order of increasing powers of x; together with a value of ...

oltre 8 anni fa

Risolto


Distance a ball travels after throwing vertically
Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

oltre 8 anni fa

Risolto


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

oltre 8 anni fa

Risolto


Volume of a Parallelepiped
Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

oltre 8 anni fa

Risolto


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

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

oltre 8 anni fa

Risolto


Indexing the array: Shift right with variable sized arrays
* Write a statement to shift the array contents 1 position to the left. * Assign the rightmost element with -1. Ex: [12, 85...

oltre 8 anni fa

Risolto


Relational operators and row arrays: Run times
* Construct a row array fastRunTimes containing all elements of runTimes equal to or less than 480 seconds. Ex: If runTimes =...

oltre 8 anni fa

Risolto


What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

oltre 8 anni fa

Risolto


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

oltre 8 anni fa

Risolto


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

oltre 8 anni fa

Risolto


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

oltre 8 anni fa

Risolto


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

oltre 8 anni fa

Risolto


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (http://en.wikipedia.org...

oltre 8 anni fa

Risolto


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

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

oltre 8 anni fa

Risolto


longest sequence of nans
In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

oltre 8 anni fa

Risolto


If you prick us, do we not bleed?
While doing some quick sewing to fix up your child's Halloween costume, you accidentally jab your finger with the needle. Refle...

quasi 9 anni fa

Risolto


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

quasi 9 anni fa

Risolto


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

quasi 9 anni fa

Risolto


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

quasi 9 anni fa

Risolto


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

quasi 9 anni fa

Risolto


N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

quasi 9 anni fa

Risolto


sort matrix
Given a matrix, sort it for each column, but cannot change the element of each row. for example input = [1 3; 2 4;1 5;3 6]; ...

quasi 9 anni fa

Risolto


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

quasi 9 anni fa

Risolto


become the batman and save gotham!!!
:\\YOU ARE THE BATMAN//: Batman needs your help to save gotham city from its villains! One day while patrolling the streets...

quasi 9 anni fa

Carica altro