Community Profile

# Raymond MacNeil

### University of British Columbia

62 2018 年以降の合計貢献数

#### Raymond MacNeil's バッジ

Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

14日 前

Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

14日 前

Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

15日 前

Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

15日 前

Create a vector
Create a vector from 0 to n by intervals of 2.

15日 前

Find max
Find the maximum value of a given vector or matrix.

15日 前

Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

15日 前

Get the length of a given vector
Given a vector x, the output y should equal the length of x.

15日 前

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

15日 前

Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

16日 前

Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

16日 前

My school needs to upgrade its license. I do not know what toolboxes to request. Who should I ask for advice?
Hi Valerie: I was at one point a lab technichian, and though I did not have the higher-level adminstrative role that you seem ...

18日 前 | 0

| 採用済み

Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

18日 前

Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

18日 前

Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

18日 前

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

19日 前

Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

19日 前

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

19日 前

Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

19日 前

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

19日 前

regexp: what am I missing from the documentation?
I have tried to carefully read the regexp documentation, and I am able to sucessfully implement regexp in the simplest cases. F...

21日 前 | 1 件の回答 | 0

### 1

Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

Is my wife right?
Regardless of input, output the string 'yes'.

Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

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

Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

Inner product of two vectors
Find the inner product of two vectors.

Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...