Nick1982
On this page, you find all documents, package deals, and flashcards offered by seller nick1982.
- 32
- 0
- 4
Community
- Followers
- Following
37 items
Matlab Cody Problem 174. Roll the Dice
Problem 174. Roll the Dice!
Created by @bmtran (Bryant Tran) in Community 
Description
Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice.
Example
 [x1,x2] = rollDice();
 x1 = 5;
 x2 = 2;

- Package deal
- Answers
- • 2 pages •
Problem 174. Roll the Dice!
Created by @bmtran (Bryant Tran) in Community 
Description
Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice.
Example
 [x1,x2] = rollDice();
 x1 = 5;
 x2 = 2;

Matlab Cody Problem 41. Cell joiner
Problem 41. Cell joiner
Created by Cody Team in Cody Challenge 
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string from the cell array separated by the delimiter.
For example, this input
 in_cell = {'Lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur'};
 delim = ' ';
should produce this output:
 out_str = 'Lorem ipsum dolor sit amet consectetur';

- Package deal
- Answers
- • 2 pages •
Problem 41. Cell joiner
Created by Cody Team in Cody Challenge 
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string from the cell array separated by the delimiter.
For example, this input
 in_cell = {'Lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur'};
 delim = ' ';
should produce this output:
 out_str = 'Lorem ipsum dolor sit amet consectetur';

Matlab Cody Problem 46. Which doors are open
Problem 46. Which doors are open?

There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut these doors in a particular manner:

 Toggle the state of each door you visit. That is, if the door is shut, open it, and if the door is open, shut it.
 On the i-th trip down the alley, start with door i and visit every i-th door.

Given n doors, return the list of open doors.

Example:

Let's say n = 3.

 On your first trip, yo...
- Package deal
- Answers
- • 2 pages •
Problem 46. Which doors are open?

There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut these doors in a particular manner:

 Toggle the state of each door you visit. That is, if the door is shut, open it, and if the door is open, shut it.
 On the i-th trip down the alley, start with door i and visit every i-th door.

Given n doors, return the list of open doors.

Example:

Let's say n = 3.

 On your first trip, yo...
Matlab Cody Problem 262. Swap the input arguments
Problem 262. Swap the input arguments
Created by Steve Eddins in Community 
Write a two-input, two-output function that swaps its two input arguments. For example:
 [q,r] = swap(5,10)
returns q = 10 and r = 5.

- Package deal
- Answers
- • 2 pages •
Problem 262. Swap the input arguments
Created by Steve Eddins in Community 
Write a two-input, two-output function that swaps its two input arguments. For example:
 [q,r] = swap(5,10)
returns q = 10 and r = 5.

5 Matlab Cody Problems Vol 2
Problems 13 , 22 , 28 , 37 and 105 with full functional code . Just copy and paste to the provided links and complete the problems mentioned above!
- Package deal
- • 5 items •
- Matlab Cody Problem 37. Pascal's Triangle • Answers
- Matlab Cody Problem 105. How to find the position of an element in a vector without using the find function • Answers
- Matlab Cody Problem 28 . Counting Money • Answers
- Matlab Cody Problem 22. Remove the vowels • Answers
- Matlab Cody Problem 13. Remove all the consonants • Answers
Problems 13 , 22 , 28 , 37 and 105 with full functional code . Just copy and paste to the provided links and complete the problems mentioned above!
Matlab Cody Problem 27. Pangrams!
Problem 27. Pangrams!
Created by Cody Team in Cody Challenge 
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once.
Example:
 Input s = 'The quick brown fox jumps over the lazy dogs'
 Output tf = true

- Package deal
- Answers
- • 2 pages •
Problem 27. Pangrams!
Created by Cody Team in Cody Challenge 
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once.
Example:
 Input s = 'The quick brown fox jumps over the lazy dogs'
 Output tf = true

Matlab Cody Problem 13. Remove all the consonants
Problem 13. Remove all the consonants
Created by Cody Team in Cody Challenge 
Remove all the consonants in the given phrase.
Example:
 Input s1 = 'Jack and Jill went up the hill'; 
 Output s2 is 'a a i e u e i';

- Package deal
- Answers
- • 2 pages •
Problem 13. Remove all the consonants
Created by Cody Team in Cody Challenge 
Remove all the consonants in the given phrase.
Example:
 Input s1 = 'Jack and Jill went up the hill'; 
 Output s2 is 'a a i e u e i';

Matlab Cody Problem 22. Remove the vowels
Problem 22. Remove the vowels
Created by Cody Team in Cody Challenge 
Remove all the vowels in the given phrase.
Example:
 Input s1 = 'Jack and Jill went up the hill'
 Output s2 is 'Jck nd Jll wnt p th hll'

- Package deal
- Answers
- • 2 pages •
Problem 22. Remove the vowels
Created by Cody Team in Cody Challenge 
Remove all the vowels in the given phrase.
Example:
 Input s1 = 'Jack and Jill went up the hill'
 Output s2 is 'Jck nd Jll wnt p th hll'

Matlab Cody Problem 28 . Counting Money
Problem 28. Counting Money

Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99.

Example:

 Input a = {'$12,001.87','$0.04','$12,003,887.55','$0.32'};
 Output b is 12015889.78


- Package deal
- Answers
- • 2 pages •
Problem 28. Counting Money

Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99.

Example:

 Input a = {'$12,001.87','$0.04','$12,003,887.55','$0.32'};
 Output b is 12015889.78


Matlab Cody Problem 105. How to find the position of an element in a vector without using the find function
Problem 105. How to find the position of an element in a vector without using the find function
Created by Chelsea in Community

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.

Examples:

 findPosition([1 3 5 4 2], 2)
 posX is 5

 findPosition([1 5 8 6 7 6 0], 8)
 posX is 3


- Package deal
- Answers
- • 2 pages •
Problem 105. How to find the position of an element in a vector without using the find function
Created by Chelsea in Community

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.

Examples:

 findPosition([1 3 5 4 2], 2)
 posX is 5

 findPosition([1 5 8 6 7 6 0], 8)
 posX is 3