Community Profile

photo

Tom


University of Massachusetts Boston

66 2012 이후 총 참여 횟수

담당자

Tom's 배지

  • 3 Month Streak
  • First Answer
  • Quiz Master
  • Creator
  • Commenter
  • Solver

세부 정보 보기...

참여 게시물
보기 기준

해결됨


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

7년 이하 전

해결됨


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

7년 이상 전

해결됨


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

7년 이상 전

해결됨


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

7년 이상 전

해결됨


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

7년 이상 전

해결됨


Pascal's Triangle
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...

7년 이상 전

해결됨


Reverse the vector
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]

7년 이상 전

해결됨


Get the area codes from a list of phone numbers
Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

7년 이상 전

해결됨


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

7년 이상 전

해결됨


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

7년 이상 전

해결됨


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

7년 이상 전

해결됨


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

7년 이상 전

해결됨


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

7년 이상 전

해결됨


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

7년 이상 전

해결됨


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

7년 이상 전

해결됨


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

7년 이상 전

해결됨


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

7년 이상 전

해결됨


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

7년 이상 전

해결됨


inner product of two vectors
inner product of two vectors

7년 이상 전

해결됨


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

7년 이상 전

해결됨


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

7년 이상 전

해결됨


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

7년 이상 전

해결됨


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

7년 이상 전

답변 있음
How to declare a structure as global
The easiest way would be to preallocate it from outside the for loop. In MATLAB, you don't have to declare variables, but you ca...

7년 이상 전 | 0

해결됨


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

7년 이상 전

해결됨


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

7년 이상 전

해결됨


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

7년 이상 전

답변 있음
Plot Vector using Plot3
I would set _t=0:0.05:1;_, for instance. I was thinking of using the hold function when plotting. Without it I would think yo...

7년 이상 전 | 0

답변 있음
Plot Vector using Plot3
Since vectors aren't really tied to points, you need to first specify a starting point for your vectors. If you want them to hav...

7년 이상 전 | 0

해결됨


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

7년 이상 전

Load more