Statistica
RANK
599
of 297.046
REPUTAZIONE
128
CONTRIBUTI
49 Domande
32 Risposte
ACCETTAZIONE DELLE RISPOSTE
85.71%
VOTI RICEVUTI
45
CONTRIBUTI
0 Post
CONTRIBUTI
0 Pubblico Canali
VALUTAZIONE MEDIA
CONTRIBUTI
0 Punti principali
NUMERO MEDIO DI LIKE
Feeds
Risolto
Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...
oltre 8 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 ...
oltre 8 anni fa
Risolto
Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...
oltre 8 anni fa
Risolto
Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.
oltre 8 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...
oltre 8 anni fa
Risolto
Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...
oltre 8 anni fa
Risolto
Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...
oltre 8 anni fa
Problema
Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|
oltre 9 anni fa | 0 | 102 risolutori
Risolto
Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...
oltre 9 anni fa
Risolto
Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.
oltre 9 anni fa
Risolto
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...
oltre 9 anni fa
Problema
Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...
circa 11 anni fa | 10 | 657 risolutori
Risolto
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
circa 11 anni fa
Risolto
Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.
circa 11 anni fa
Risolto
What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...
circa 11 anni fa
Risolto
Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.
circa 11 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 11 anni fa
Risolto
Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.
circa 11 anni fa
Risolto
Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...
circa 11 anni fa
Risolto
Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...
circa 11 anni fa
Risolto
Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]
circa 11 anni fa
Risolto
Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...
circa 11 anni fa
Risolto
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...
circa 11 anni fa
Risolto
Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...
circa 11 anni fa
Risolto
Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...
circa 11 anni fa
Risolto
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
circa 11 anni fa