Community Profile

photo

onewhaleid


University of New South Wales

Actif depuis 2015

Followers: 0   Following: 0

Contact

Statistiques

All
  • First Review
  • First Answer
  • Solver

Afficher les badges

Feeds

Afficher par

A répondu
Efficiently setting lower axis limit
I use the |xlim| function. When called with no arguments, it returns the current limits: xlim([0, max(xlim)])

plus de 6 ans il y a | 5

A résolu


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

presque 9 ans il y a

A répondu
changing font size in all the elements of figures
I use *findall* to change the font size for all text in a single figure: set(findall(gcf,'-property','FontSize'),'FontSize'...

presque 9 ans il y a | 30

Question


Graphical output from FINDPEAKS
The documentation for *findpeaks* states the following: FINDPEAKS(...) without output arguments plots the signal and the pe...

presque 9 ans il y a | 1 réponse | 0

1

réponse

A résolu


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

presque 9 ans il y a

A résolu


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

environ 9 ans il y a

A résolu


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

environ 9 ans il y a

A résolu


Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

environ 9 ans il y a

A résolu


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

environ 9 ans il y a

A résolu


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

environ 9 ans il y a

A résolu


Renaming a field in a structure array
MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

environ 9 ans il y a

A résolu


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

environ 9 ans il y a

A résolu


Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

environ 9 ans il y a

A résolu


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

environ 9 ans il y a

A résolu


Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provide...

environ 9 ans il y a

Charger plus