Question

How can I change the default units in GUIDE

Hello, I use GUIDE for many of my GUIs. I like using 'pixels' for the figure and all uicontrols. Unfortunately, the default uni...

6 years ago | 3 answers | 0

Solved

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

7 years ago

Solved

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

7 years ago

Solved

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

7 years ago

Solved

Cody Matlab Version

What is the current Cody Matlab Release? *Output:* string *Examples:* '(R2012a)' or 'R2012a' Hint: We have mo...

7 years ago

Solved

We love vectorized solutions. Problem 1 : remove the row average.

Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

7 years ago

Solved

Sophie Germain prime

In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

7 years ago

Solved

Number of Horns on a unicorn!

Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

7 years ago

Solved

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

7 years ago

Solved

Return the first and last character of a string

Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

7 years ago

Solved

Multiply a column by a row

* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

7 years ago

Solved

Rotate a Matrix

Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

7 years ago

Solved

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

7 years ago

Solved

Determine Whether an array is empty

Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

7 years ago

Solved

Sort numbers by outside digits

Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

8 years ago

Solved

Scoring for oriented dominoes

Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

8 years ago

Solved

Cody Computer Part 1 - Guess the system font used by uipanel

list = listfonts return the list of available system fonts. Can you guess which font is used for uipanel on the CODY computer...

8 years ago

Solved

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

8 years ago

Solved

Find the largest value in the 3D matrix

Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

8 years ago

Solved

Count photos

Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

8 years ago

Solved

Converting Decimal to Binary

Given a decimal number that may include a fractional component, convert it into binary representation. The numbers you are given...

8 years ago

Solved

Back to basics 24 - Symbolic variables

Covering some basic topics I haven't seen elsewhere on Cody. Given a string algebraic expression, return the symbolic variabl...

8 years ago

Solved

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

8 years ago

Solved

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.

8 years ago

Solved

Sum of diagonal of a square matrix

If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

8 years ago

Solved

Replace May with April

For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

8 years ago

Solved

resistor ladder

* You have a bunch (an odd number N) of identical resistors (each R ohms), a good battery (V volts), and a high impedance voltme...

8 years ago

Solved

Sorting

Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

8 years ago

Solved

cos for boss?

a programmer had too much coffee and his boss needs cos(alpha+beta) correctly, especially when alpha or beta or the coffee are c...

8 years ago