Risolto


Rolling maximums above a threshold
You are given either a vector or a 2-D matrix M and a threshold value of t. Write a script that will calculate how many times t...

oltre 4 anni fa

Risolto


jumping astronauts
The surface gravity on the moon is approximately 2 m/s^2. Thats why an funny astronauts feels as light as a feather and jumps fr...

oltre 4 anni fa

Risolto


house of cards
How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

oltre 4 anni fa

Risolto


Babylonian method
Calculate the square root of a given positive number a using the Babylonian method (https://en.wikipedia.org/wiki/Methods_of_co...

oltre 4 anni fa

Risolto


Euler–Mascheroni constant
Approximate the Euler-Mascheroni constant using the series representation gamma_n=\sum_{k=1}^{n} [1/k-ln(1+1/k)] Calculat...

oltre 4 anni fa

Risolto


Hilbert numbers
Given a positive integer, n, return h as follows: 1. If n is not a <https://en.wikipedia.org/wiki/Hilbert_number Hilbert numb...

oltre 4 anni fa

Risolto


last n digit of a power function
Calculate the power of a given a base, exponent. Return the last n digit number. Example 1: base = 3; expo = 8; n = 3; ...

oltre 4 anni fa

Risolto


Exponentiation
Given 3 integers b,e,k; find -- mod(b^e,k)

oltre 4 anni fa

Problema


Exponentiation
Given 3 integers b,e,k; find -- mod(b^e,k)

oltre 4 anni fa | 1 | 27 risolutori

Risolto


Convert Decimal Number to Hex number (including non integer value)
Convert Decimal Number to Hex number (including non integer value) E.X. (2598.675) in decimal = A26.ACCC in hexa

oltre 4 anni fa

Risolto


Dimensions of Spaces
Find the dimension of the column space, null space, row space, and left null space for any matrix. Example input A=[1 2 ...

oltre 4 anni fa

Risolto


Recursion - Fun
Generate the first k terms in the sequence a(n) define recursively by a(n+1)=p*a(n)+(1+a(n)) with p=0.9 and a(1)=0.5 ...

oltre 4 anni fa

Risolto


Juggler sequence revisited
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42835-return-the-sequence-element-ii Problem 42...

oltre 4 anni fa

Risolto


Increasing sub-sequence (Level 1)
Given a vector, v, of real numbers, return a positive integer, n, representing the longest contiguous increasing sub-sequence co...

oltre 4 anni fa

Risolto


Find the gcm of n given values
Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

oltre 4 anni fa

Risolto


center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

oltre 4 anni fa

Risolto


Find longest run
Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

oltre 4 anni fa

Risolto


Addition Partition
You will be given two numbers, N and K. Write a MATLAB function that will determine how many different unique ways you can have...

oltre 4 anni fa

Risolto


Block average ignoring NaN values
Given a matrix, calculate the block average of each disjoint sub-matrix while ignoring *NaN* values. Assume that the size of the...

oltre 4 anni fa

Risolto


Block average
Given a matrix, calculate the block average of each disjoint sub-matrix of the same size. Assume that the size of the matrix alo...

oltre 4 anni fa

Risolto


Free-time Equation
Given a 7-day week, an *_nc_* -number of *_tc_* -hour classes, *_ta_* -hours awake in a day, and *_tw_* -hours that you work in ...

oltre 4 anni fa

Risolto


linear least squares fitting
Inputs: * |f|: cell-array of function handles * |x|: column vector of |x| values * |y|: column vector of |y| values, same l...

oltre 4 anni fa

Risolto


Project Euler: Problem 18, Maximum path sum I
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bott...

oltre 4 anni fa

Risolto


Outer product of multiple vectors
In tensor algebra, it is often useful to define a tensor as a product of lower order tensors. Similarly, a multidimensional arra...

oltre 4 anni fa

Risolto


Combined Ages 4 - Non-symmetric with multiples, n ≥ 3
This problem is slightly more difficult than <http://www.mathworks.com/matlabcentral/cody/problems/42383-combined-ages-3-non-sym...

oltre 4 anni fa

Risolto


Combined Ages 3 - Non-symmetric, n ≥ 3
Pursuant to the previous two problems ( <http://www.mathworks.com/matlabcentral/cody/problems/42382-combined-ages-1-symmetric-n-...

oltre 4 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 4 anni fa

Risolto


Number construction I
Given a positive integer, n, return a, b, c and d, such that 1. n = a*sqrt(b)+c*sqrt(d) 2. a, b, c and d are all positive ...

oltre 4 anni fa

Risolto


Sorting integers by their digits (Level 3)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42811-sorting-integers-by-their-digits-level...

oltre 4 anni fa

Risolto


Sorting integers by their digits (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

oltre 4 anni fa

Carica altro