Community Profile

photo

JB


Last seen: más de 2 años hace Con actividad desde 2016

-

Estadísticas

  • MATLAB Central Treasure Hunt Finisher
  • Draw Letters
  • Speed Demon
  • Leader
  • Community Group Solver
  • Introduction to MATLAB Master
  • Cody Problems in Japanese Master
  • CUP Challenge Master
  • Promoter
  • Scavenger Finisher
  • Solver

Ver insignias

Content Feed

Ver por

Resuelto


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

más de 3 años hace

Resuelto


Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

más de 3 años hace

Resuelto


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

más de 3 años hace

Resuelto


Renaming a field in a structure array
MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

más de 3 años hace

Resuelto


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

más de 3 años hace

Resuelto


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

más de 3 años hace

Resuelto


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

más de 3 años hace

Resuelto


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

más de 3 años hace

Resuelto


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

más de 3 años hace

Resuelto


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

más de 3 años hace

Resuelto


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

más de 3 años hace

Resuelto


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

más de 3 años hace

Resuelto


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

más de 3 años hace

Resuelto


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

más de 3 años hace

Resuelto


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

más de 3 años hace

Resuelto


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

más de 3 años hace

Resuelto


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

más de 3 años hace

Resuelto


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

más de 3 años hace

Resuelto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

más de 3 años hace

Resuelto


Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provi...

más de 3 años hace

Resuelto


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

más de 3 años hace

Resuelto


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

más de 3 años hace

Resuelto


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

más de 3 años hace

Resuelto


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


It's going down. We're finding simbers!
This problem is inspired by Project Euler 520: Simbers. "We define a simber to be a positive integer in which any odd digit, ...

más de 3 años hace

Cargar más