Risolto


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

quasi 12 anni fa

Risolto


01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

quasi 12 anni fa

Risolto


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

quasi 12 anni fa

Risolto


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

quasi 12 anni fa

Problema


Eight queens puzzle
The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each ot...

quasi 12 anni fa | 0 | 6 risolutori

Risolto


Add two numbers
Add two numbers (For beginners)

quasi 12 anni fa

Risolto


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

quasi 12 anni fa

Risolto


Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody. Switch the byte order of the input (i.e. if little-endian -> big...

quasi 12 anni fa

Risolto


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

quasi 12 anni fa

Risolto


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

quasi 12 anni fa

Risolto


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

quasi 12 anni fa

Risolto


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

quasi 12 anni fa

Risolto


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

quasi 12 anni fa

Risolto


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

quasi 12 anni fa

Risolto


only input
Return the output without writing any code into the function.

quasi 12 anni fa

Risolto


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

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

quasi 12 anni fa

Risolto


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

quasi 12 anni fa

Risolto


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

quasi 12 anni fa

Risolto


Min of a Matrix
Return the minimum value in the given matrix.

quasi 12 anni fa

Risolto


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

quasi 12 anni fa

Risolto


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

quasi 12 anni fa

Risolto


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

quasi 12 anni fa

Risolto


Return area of square
Side of square=input=a Area=output=b

quasi 12 anni fa

Risolto


kmph to mps
convert kilometer per hour to meter per second

quasi 12 anni fa

Risolto


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

quasi 12 anni fa

Risolto


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

quasi 12 anni fa

Risolto


Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...

quasi 12 anni fa

Risolto


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

quasi 12 anni fa

Risolto


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

quasi 12 anni fa

Carica altro