Problem


Find the first N zeros of the 666 function
Using the following definition of the 666 function for this problem: _f(n)=sin('nnn')-cos(n*n*n)_, write a function that returns...

fast 12 Jahre vor | 2 | 24 Lösungsvorschläge

Problem


What is the nth step in Conway's Life?
Based on <Problem 52. What is the next step in Conway's Life?> Generalize your solution to Problem 52 - Give the state of the...

fast 12 Jahre vor | 2 | 29 Lösungsvorschläge

Problem


Factorions: Numbers that equal the sum of the factorials of their digits
From Wikipedia: _A factorion is a natural number that equals the sum of the factorials of its decimal digits_ For example: ...

fast 12 Jahre vor | 2 | 83 Lösungsvorschläge

Problem


Dudeney Numbers: Numbers which are the cube of their decimal sum
From Wikipedia: _A Dudeney number is a positive integer that is a perfect cube such that the sum of its decimal digits is equa...

fast 12 Jahre vor | 2 | 78 Lösungsvorschläge

Gelöst


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

fast 12 Jahre vor

Gelöst


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

fast 12 Jahre vor

Gelöst


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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.

fast 12 Jahre vor

Gelöst


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


kmph to mps
convert kilometer per hour to meter per second

fast 12 Jahre vor

Gelöst


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

fast 12 Jahre vor

Gelöst


Back to basics 26 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of strings of all MATLAB keywords.

fast 12 Jahre vor

Gelöst


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

fast 12 Jahre vor

Gelöst


Back to basics 17 - white space
Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

fast 12 Jahre vor

Gelöst


Back to basics 3 - Temp Directory
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the path to the system's current temp di...

fast 12 Jahre vor

Gelöst


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

fast 12 Jahre vor

Gelöst


Back to basics 5 - Clipboard
Covering some basic topics I haven't seen elsewhere on Cody. Copy the input string to the clipboard

fast 12 Jahre vor

Mehr laden