解決済み


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

約10年 前

解決済み


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

約10年 前

解決済み


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

約10年 前

解決済み


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

約10年 前

解決済み


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

約10年 前

解決済み


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

約10年 前

解決済み


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

約10年 前

解決済み


Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

約10年 前

解決済み


Find best placement for ordered dominoes (harder)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

約10年 前

解決済み


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

約10年 前

解決済み


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年 前

解決済み


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

約10年 前

解決済み


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

約10年 前

解決済み


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

約10年 前

解決済み


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

約10年 前

解決済み


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

約10年 前

解決済み


Lose control
Remove all characters that are below space in ASCII value.

約10年 前

解決済み


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年 前

解決済み


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

約10年 前

解決済み


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

約10年 前

解決済み


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

約10年 前

解決済み


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

約10年 前

解決済み


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

約10年 前

解決済み


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

約10年 前

解決済み


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

約10年 前

解決済み


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

約10年 前

解決済み


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

約10年 前

解決済み


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

約10年 前

解決済み


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

約10年 前

解決済み


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

約10年 前

さらに読み込む