Risolto


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

circa 10 anni fa

Risolto


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

circa 10 anni fa

Risolto


Find best domino orientation
Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

circa 10 anni fa

Risolto


Choose the best fitting dominoes
You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be plac...

circa 10 anni fa

Risolto


Simple polynomial evaluation
Compute the value of a polynomial of degree n with all coefficients '1', at value x. n is always n>=0. p(x)=1+x+x^2+...+x^n...

circa 10 anni fa

Risolto


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

circa 10 anni fa

Risolto


Repeat the entries of the vector to their reference times in the vector.
e.g for input x: [ 7 3 9 5] output y: [ 7 3 3 9 9 9 5 5 5 5]

circa 10 anni fa

Risolto


multiply an array by its position number
You have given an array. Multiply an array by its position number

circa 10 anni fa

Risolto


first element of matrix
find the first elements of a column matrix

circa 10 anni fa

Risolto


find a specific element from an matrix
Find the element from matrix which is in 2nd row and 3rd column.

circa 10 anni fa

Risolto


find the mean of all elements in a matrix
given a matrix, just find the mean of all elements in the matrix

circa 10 anni fa

Risolto


Find mean
given an array, find the mean of the number in that array

circa 10 anni fa

Risolto


find sum of the numbers in array
calculate the sum of numbers in a given array

circa 10 anni fa

Risolto


Halder function
Find the halder function value of a number

circa 10 anni fa

Risolto


find max
You are given an array number find the maximum

circa 10 anni fa

Risolto


find minimum
find the minimum from an array

circa 10 anni fa

Risolto


modulus of a number
find the modulus of a given number

circa 10 anni fa

Risolto


Vector with a repeated entry
Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4] Hint: Search for the function...

circa 10 anni fa

Risolto


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

circa 10 anni fa

Risolto


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

circa 10 anni fa

Risolto


Square root of a number
Write a code that will output the square root of x.

circa 10 anni fa

Risolto


If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

circa 10 anni fa

Risolto


Find unique number in input
Find value that occurs in odd number of input elements.

circa 10 anni fa

Risolto


what can you get for exactly amount of money
You go to store, where each product has price. Prices are in vector s= [ 195 125 260 440 395 290] and you have amount of ...

circa 10 anni fa

Risolto


this is a test problem
this is a anniversary test problem

circa 10 anni fa

Risolto


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

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

circa 10 anni fa

Risolto


radius of a spherical planet
you just measured its surface area, that is the input.

circa 10 anni fa

Risolto


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

circa 10 anni fa

Risolto


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

circa 10 anni fa

Carica altro