解決済み


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

11年弱 前

解決済み


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

約11年 前

解決済み


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

約11年 前

解決済み


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

約11年 前

解決済み


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

約11年 前

解決済み


Add two numbers
Add two numbers (For beginners)

約11年 前

解決済み


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

約11年 前

解決済み


What is the next step in Conway's Life?
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

約11年 前

解決済み


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

約11年 前

解決済み


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

約11年 前

解決済み


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

約11年 前

解決済み


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

約11年 前

解決済み


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

約11年 前

解決済み


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

約11年 前

解決済み


DNA N-Gram Distribution
Given a string s and a number n, find the most frequently occurring n-gram in the string, where the n-grams can begin at any poi...

約11年 前

解決済み


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

約11年 前

解決済み


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

約11年 前

解決済み


Back to basics 2 - Function Path
Covering some basic topics I haven't seen elsewhere on Cody. Given a string that is the name of a MATLAB function, return a s...

約11年 前

解決済み


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

約11年 前

解決済み


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

約11年 前

解決済み


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

約11年 前

解決済み


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

約11年 前

解決済み


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

約11年 前

解決済み


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

約11年 前

解決済み


Celcius to Kelvin
Convert Celsius degrees to Kelvin temperature.

約11年 前

解決済み


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

約11年 前

解決済み


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

約11年 前

解決済み


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

約11年 前

解決済み


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

約11年 前

解決済み


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

約11年 前

さらに読み込む