Community Profile

Contact

Top 1% contributor

Has anybody out there ever tried to access the "Sudden Motion Sensor" present in any Macbook via Matlab? I searched the ...

1 Answers

0

Asked 1 year ago

For this challenge you get two inputs: a matrix A and an integer value n. Your function should return a Matrix B of the same si...

Solve this!

3 years ago

If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

2 years ago

Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

This dog() may be drowsy or function immediately when you call, return 1 or 0 accordingly within 2/10 second.

let wolf() make one or two steps to get a feel of the beat, it is waltz, do not let wolf() make the third step, return safely ju...

given a person_of_interest, what is his_name?

Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

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

You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

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

Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

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

Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

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

Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

1:3 -> 0; 3:5 -> 6

Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

Load more