Solved


String Logic 17
Examples: 'DIG' --> 'GDI' 'IMPORTANT' --> 'TANTIMPOR' 'DEAL' --> 'EALD' 'LIMB' --> 'IMBL' 'MOSTLY' --> 'YMOSTL'

18 dagen ago

Solved


String Logic 16
Examples: 'DIG' --> 'DIG' 'KIMBALL' --> 'ALLKIMB' 'DEAL' --> 'EALD' 'LIMB' --> 'IMBL' 'MADE' --> 'ADEM'

18 dagen ago

Solved


String Logic 3
Example: 'CAT' --> 'RPI' 'DOG' --> 'SDV' 'MATLAB' --> 'BPIAPQ' 'ROSY' --> 'GDHN' 'TRUST' --> 'IGJHI' 'MOSTLY' --> 'BDHI...

18 dagen ago

Solved


String Logic 4
Example: 'CAT' --> 'IGZ' 'DOG' --> 'JUM' 'MATLAB' --> 'SGZRGH' 'ROSY' --> 'XUYE' 'TRUST' --> 'ZXAYZ' 'MOSTLY' --> 'SUYZ...

18 dagen ago

Solved


String Logic 13
Examples: 'CAT' --> 'TCA' 'DOG' --> 'OGD' 'ROSY' --> 'YSRO' 'MOSTLY' --> 'YTSOML'

18 dagen ago

Solved


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

18 dagen ago

Solved


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

18 dagen ago

Solved


Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

18 dagen ago

Solved


select the primes of a vector
Find the prime numbers in a vector

18 dagen ago

Solved


Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.

18 dagen ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

18 dagen ago

Solved


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

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

18 dagen ago

Solved


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

18 dagen ago

Solved


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

18 dagen ago

Solved


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

18 dagen ago

Solved


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

18 dagen ago

Solved


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

18 dagen ago

Solved


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

18 dagen ago

Solved


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

18 dagen ago

Solved


give nth decimal place of pi
max 15th place after the decimal point is ok for now

18 dagen ago

Solved


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

18 dagen ago

Solved


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

18 dagen ago

Solved


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

18 dagen ago

Solved


RGB to CMYK
Convert an RGB code to the corresponding CMYK code for printing. The RGB input is a [1×3] double array between 0 and 1. ...

18 dagen ago

Solved


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

18 dagen ago

Solved


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

18 dagen ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

18 dagen ago

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

18 dagen ago

Solved


String Logic 18
Examples: 'DIG' --> 'DG' 'IMPORTANT' --> 'IPRAT' 'DEAL' --> 'DA' 'LIMB' --> 'LM' 'MOSTLY' --> 'MSL'

18 dagen ago

Load more