Improve your search results. Select your educational institution and subject so that we can show you the most relevant documents and help you in the best way possible.
Ok, I understand!
Your school or university
Improve your search results. Select your educational institution and subject so that we can show you the most relevant documents and help you in the best way possible.
Here are the best resources to pass Matlab Cody. Find Matlab Cody study guides, notes, assignments, and much more.
All
26 results
Sort by
Matlab Cody Problem 45. Make a Palindrome Number
Answers • 2
pages
• 2018
Problem 45. Make a Palindrome Number
Created by Cody Team in Cody Challenge 
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a reversed copy of itself.
 124
 421
 ----
 545
Let's try another.
 150
 051
 ----
 201
No, that didn't work, but what if we keep going?
 201
 102
 ----
 303
There, it became a palindrome again. Given a, return b = find_palindrome(a) such that b is the palindrome numb...
Matlab Cody Problem 45. Make a Palindrome Number
Last document update:
ago
Problem 45. Make a Palindrome Number
Created by Cody Team in Cody Challenge 
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a reversed copy of itself.
 124
 421
 ----
 545
Let's try another.
 150
 051
 ----
 201
No, that didn't work, but what if we keep going?
 201
 102
 ----
 303
There, it became a palindrome again. Given a, return b = find_palindrome(a) such that b is the palindrome numb...
Matlab Cody Problem 44. Trimming Spaces.
Answers • 2
pages
• 2018
Problem 44. Trimming Spaces
Created by Cody Team in Cody Challenge 
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32).
 Input a = ' singular value decomposition '
 Output b is 'singular value decomposition'

Matlab Cody Problem 44. Trimming Spaces.
Last document update:
ago
Problem 44. Trimming Spaces
Created by Cody Team in Cody Challenge 
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32).
 Input a = ' singular value decomposition '
 Output b is 'singular value decomposition'

Matlab Cody Problem 38. Return a list sorted by number of occurrences
Answers • 2
pages
• 2018
Problem 38. Return a list sorted by number of occurrences
Created by Cody Team in Cody Challenge 
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x.
Ties are resolved by a sort from lowest to highest.
So if
 x = [1 2 2 2 3 3 7 7 93]
then
 y = [2 3 7 1 93]

Matlab Cody Problem 38. Return a list sorted by number of occurrences
Last document update:
ago
Problem 38. Return a list sorted by number of occurrences
Created by Cody Team in Cody Challenge 
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x.
Ties are resolved by a sort from lowest to highest.
So if
 x = [1 2 2 2 3 3 7 7 93]
then
 y = [2 3 7 1 93]

Matlab Cody Problem 128. Sorted highest to lowest.
Answers • 2
pages
• 2018
Problem 128. Sorted highest to lowest?
Created by AMITAVA BISWAS in Community 
Return 1 if the input is sorted from highest to lowest, 0 if not.
Example:
 1:7 -> 0
 [7 5 2] -> 1

Matlab Cody Problem 128. Sorted highest to lowest.
Last document update:
ago
Problem 128. Sorted highest to lowest?
Created by AMITAVA BISWAS in Community 
Return 1 if the input is sorted from highest to lowest, 0 if not.
Example:
 1:7 -> 0
 [7 5 2] -> 1

$6.50 for your textbook summary multiplied by 100 fellow students... Do the math: that's a lot of money! Don't be a thief of your own wallet and start uploading yours now.
Problem 18. Bullseye Matrix
Created by Cody Team in Cody Challenge 
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n 1)/2 around the center point. Examples:
 Input n = 3
 Output a is [ 2 2 2 
 2 1 2
 2 2 2 ]
 Input n = 5
 Output a is [ 3 3 3 3 3
 3 2 2 2 3 
 3 2 1 2 3
 3 2 2 2 3 
 3 3 3 3 3 ]

Matlab Cody Problem 18. Bullseye Matrix
Last document update:
ago
Problem 18. Bullseye Matrix
Created by Cody Team in Cody Challenge 
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n 1)/2 around the center point. Examples:
 Input n = 3
 Output a is [ 2 2 2 
 2 1 2
 2 2 2 ]
 Input n = 5
 Output a is [ 3 3 3 3 3
 3 2 2 2 3 
 3 2 1 2 3
 3 2 2 2 3 
 3 3 3 3 3 ]

Problem 40. Reverse Run-Length Encoder
Created by Cody Team in Cody Challenge 
Given a "counting sequence" vector x, construct the original sequence y.
A counting sequence is formed by "counting" the entries in a given sequence. This is sometimes called run-length encoding.
For example, the sequence
 x = 2, 5, 1, 2, 4, 1, 1, 3
can be read as
 Two 5's, one 2, four 1's, one 3
which translates to
 y = 5, 5, 2, 1, 1, 1, 1, 3
So y is the reconstructed vector that corresponds to the counting seq...
Matlab Cody Problem 40. Reverse Run-Length Encoder.
Last document update:
ago
Problem 40. Reverse Run-Length Encoder
Created by Cody Team in Cody Challenge 
Given a "counting sequence" vector x, construct the original sequence y.
A counting sequence is formed by "counting" the entries in a given sequence. This is sometimes called run-length encoding.
For example, the sequence
 x = 2, 5, 1, 2, 4, 1, 1, 3
can be read as
 Two 5's, one 2, four 1's, one 3
which translates to
 y = 5, 5, 2, 1, 1, 1, 1, 3
So y is the reconstructed vector that corresponds to the counting seq...
Problem 18. Bullseye Matrix
Created by Cody Team in Cody Challenge 
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n 1)/2 around the center point. Examples:
 Input n = 3
 Output a is [ 2 2 2 
 2 1 2
 2 2 2 ]
 Input n = 5
 Output a is [ 3 3 3 3 3
 3 2 2 2 3 
 3 2 1 2 3
 3 2 2 2 3 
 3 3 3 3 3 ]

Matlab Cody Problem 247. Arrange Vector in descending order
Last document update:
ago
Problem 18. Bullseye Matrix
Created by Cody Team in Cody Challenge 
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n 1)/2 around the center point. Examples:
 Input n = 3
 Output a is [ 2 2 2 
 2 1 2
 2 2 2 ]
 Input n = 5
 Output a is [ 3 3 3 3 3
 3 2 2 2 3 
 3 2 1 2 3
 3 2 2 2 3 
 3 3 3 3 3 ]

Problem 35. Quote Doubler
Created by Cody Team in Cody Challenge 
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote character.
If there are n such occurrences in s1, then s2 will be n characters longer than s1.

Matlab Cody Problem 35. Quote Doubler
Last document update:
ago
Problem 35. Quote Doubler
Created by Cody Team in Cody Challenge 
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote character.
If there are n such occurrences in s1, then s2 will be n characters longer than s1.

Too much month left at the end of the money?
$6.50 for your textbook summary multiplied by 100 fellow students... Do the math: that's a lot of money! Don't be a thief of your own wallet and start uploading yours now.
Discover all about earning on Stuvia