解決済み


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

4年以上 前

解決済み


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: <http://...

4年以上 前

解決済み


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

4年以上 前

解決済み


Numbers in extended form
Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

4年以上 前

解決済み


Decode a simplified barcode
Given a bar code from this <http://www.mathworks.com/matlabcentral/cody/problems/602-make-a-simplified-bar-code exercise>: Re...

4年以上 前

解決済み


Make a simplified barcode
Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...

4年以上 前

解決済み


Reverse Calculator
Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

4年以上 前

解決済み


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

4年以上 前

解決済み


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

4年以上 前

解決済み


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

4年以上 前

解決済み


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

4年以上 前

解決済み


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

4年以上 前

解決済み


Equal to their cube
Tell me three real numbers that are equal to their cubes?

4年以上 前

解決済み


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

4年以上 前

解決済み


select the primes of a vector
Find the prime numbers in a vector

4年以上 前

解決済み


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

4年以上 前

解決済み


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

4年以上 前

解決済み


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

4年以上 前

解決済み


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

4年以上 前

解決済み


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

4年以上 前

解決済み


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

4年以上 前

解決済み


0<=x<=pi?
Check whether the given angle is between zero and pi. Return logical true or false.

4年以上 前

解決済み


Calculate value of Ra for three runs. Flow rates
Problem 5.31, page 220, from Felder and Rousseau Elementary Principles of Chemical Processes book <https://www.academia.edu/3...

4年以上 前

解決済み


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

4年以上 前

解決済み


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

4年以上 前

解決済み


Solve Quadratic : No * - or key functions permitted
Solve the quadratic equation *ax^2+bx+c=0*. However, some of the normal functions and symbols are not allowed. x=[ -b +/- sq...

5年弱 前

解決済み


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

5年弱 前

解決済み


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

5年弱 前

解決済み


Complex number
For complex number c=a+bi, write code that will add a and b together.

5年弱 前

解決済み


Find out next state (NS) of T Flip-Flop.
Find out next state (NS) of T Flip-Flop based on previous state (PS), inputs. Learn more about T Flip-Flop theory here: <htt...

約5年 前

さらに読み込む