Risolto


Prime numbers between a , b.
Find all prime number between a & b (including a and b). example: a=100 b=120 y= [101 103 107 109 113]

oltre 8 anni fa

Risolto


Win all the time!
This is a 2-players game. One of them is your algorithm. Your algorithm must win in all games. In this game there are 3 rows...

oltre 8 anni fa

Risolto


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

oltre 8 anni fa

Risolto


Calculate mean value of any pair in a vector.
Given a vector A, calculate the mean of 2 number in the vector one by one. example: input: A=[1, 5, 6, 8, 9, 15] output:...

oltre 8 anni fa

Risolto


Still more miles to go before I sleep
It's time for more odometer fun. Last problem, my car's odometer hit 56789. It's coming up on 111111 now, which (barring a maj...

oltre 8 anni fa

Risolto


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

oltre 8 anni fa

Risolto


Repetition of matrices
*A is a bold matrix: [1 2 3; 4 5 6;7 8 9]* Given an integer 'n' , a matrix B exists such that has n copies of A in the row an...

oltre 8 anni fa

Risolto


Guess the number I'm thinking of
In this game you are competing against two other people to guess the number that I'm thinking of. # I randomly choose an *i...

oltre 8 anni fa

Risolto


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

oltre 8 anni fa

Risolto


The other half of the Fibonacci sequence
The <http://mathworld.wolfram.com/FibonacciNumber.html "Fibonacci sequence"> — F = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,...

oltre 8 anni fa

Risolto


The maximum sum of squares (testing)
Create a function file with an input maxval to determine the maximum number of terms for the series 1^2 + 2^2 + 3^2 + ... such t...

oltre 8 anni fa

Risolto


Find the missing numbers.
Total *N* numbers are in the series of natural numbers ( *1,2,3,...,N* ). The input is an array (unsorted) of those natural num...

oltre 8 anni fa

Risolto


Angle bisectors
Given 2 direction vectors, calculate the *_two_ (2) normalized angle bisectors* (which are perpendicular between them). Input...

oltre 8 anni fa

Risolto


Under the sea: Snell's law & total internal reflection
<https://en.wikipedia.org/wiki/Snell's_law> When a light travels from one medium to another medium, depending on the refracti...

oltre 8 anni fa

Risolto


solid of revolution
Given an real polynomial P and two real numbers a,b with 0<=a<=b. Calculate the volume of the solid of revolution made by rota...

oltre 8 anni fa

Risolto


Pancakes for everyone!
Accordingly to the <http://nl.mathworks.com/matlabcentral/cody/problems/42460-the-cake-is-a-lie problem 42460>. All the children...

oltre 8 anni fa

Risolto


Funny problems
Generate the following vector: if n=1 then q=1; elseif n=2 then q=[2 2 1]; elseif n=3 then q=[3 3 3 2 2 1]; ... end

oltre 8 anni fa

Risolto


Are you more familiar with iteration methods or Linear Algebra? Let's see together.
Given a sum result *_x_* value of a *_N_* number of addends, build an array of _*N*_ elements _*y*_ such that the following equa...

oltre 8 anni fa

Risolto


The cake is a lie...
You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

oltre 8 anni fa

Risolto


Perimeter of a quadrilateral
There are four cars starting at a point. The first car points north, the second one points east, the third one points south, an...

oltre 8 anni fa

Risolto


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

oltre 8 anni fa

Risolto


Add all the numbers between two limits (inclusive)
In this problem you must add up "all of the numbers" between two specified limits, |a| and |b|, in which |a| ≤ |b|. However, th...

oltre 8 anni fa

Risolto


Curve fitting (non-linear functions) & function handles
In this problem you are provided some raw data. You need to find a way of summarising the data with just a few parameters, so t...

oltre 8 anni fa

Risolto


Determine if input is a valid AHP evaluation matrix
Input is a matrix. Output is a true or false statement (1 or 0). Return true if input is a valid Analytic Hierarchy Process eval...

oltre 8 anni fa

Risolto


Besson Ranks
Return Besson Ranks. You can look at <https://www.sciencedirect.com/science/article/pii/0895717789903671 this article.> Besso...

oltre 8 anni fa

Risolto


Curve fitting (linear functions) & function handles
In this problem you are provided some raw data. You need to find a way of summarising the data with just a few parameters, so t...

oltre 8 anni fa

Risolto


Find the starting index of a consecutive condition
Given a logical vector |v|, and a positive integer |n|, return the smallest index |i| that satisfies: all( v(i : i+n-1) ) =...

quasi 9 anni fa

Risolto


It's Happy! It's Fun! It's Happy Fun Hyperball!
Yes, it's Happy Fun Hyperball! The CODY sensation that's sweeping MATLAB nation! All you need to do to get your free Happy Fun H...

quasi 9 anni fa

Risolto


Approximate the cosine function
Without using MATLAB trigonometric functions, calculate the cosine of an argument |x| to a precision of |0.0001| *Hint:* You ...

quasi 9 anni fa

Risolto


The twelve days of Christmas
Traditionally there are twelve days of Christmas to celebrate ("Twelvetide"), typically starting with Christmas Day (25 December...

quasi 9 anni fa

Carica altro