已解决


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

10 years 前

已解决


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

10 years 前

已解决


execute the declaration in strings and return value
execute the commands in strings and return value input='a=23' output=23

10 years 前

问题


execute the declaration in strings and return value
execute the commands in strings and return value input='a=23' output=23

10 years 前 | 0 | 57 个解题者

已解决


Alternately upper-lower case
Alternately upper-lower case Let s='achyuta' output='AcHyUtA'

10 years 前

问题


Alternately upper-lower case
Alternately upper-lower case Let s='achyuta' output='AcHyUtA'

10 years 前 | 4 | 203 个解题者

已解决


most frequent character
Obtain most frequent character Let s='balaram'; output='a';

10 years 前

问题


most frequent character
Obtain most frequent character Let s='balaram'; output='a';

10 years 前 | 1 | 143 个解题者

已解决


union without repitition
Let a = [9 9 9 9 9 9 8 8 8 8 7 7 7 6 6 6 5 5 4 2 1] b = [1 1 1 3 3 3 3 3 4 4 4 4 4 10 10 10] Output should be [9 8...

10 years 前

问题


union without repitition
Let a = [9 9 9 9 9 9 8 8 8 8 7 7 7 6 6 6 5 5 4 2 1] b = [1 1 1 3 3 3 3 3 4 4 4 4 4 10 10 10] Output should be [9 8...

10 years 前 | 1 | 103 个解题者

已解决


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

10 years 前

已解决


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!

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

10 years 前

已解决


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

10 years 前

已解决


Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

10 years 前

已解决


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

10 years 前

已解决


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

10 years 前

已解决


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

10 years 前

已解决


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

10 years 前

已解决


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

10 years 前

已解决


Solitaire Cipher
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...

10 years 前

已解决


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

10 years 前

已解决


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

10 years 前

已解决


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

10 years 前

已解决


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

10 years 前

已解决


Find max
Find the maximum value of a given vector or matrix.

10 years 前

已解决


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

10 years 前

已解决


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

10 years 前

加载更多