Community Profile

# Romesh

### University of Sydney

51 total contributions since 2011

View details...

Contributions in
View by

How to enlarge legend marker size in r2014b?
Confirming on R2017a that the second output of legend has the necessary handles e.g. [~,b] = legend('foo','bar','baz') K...

oltre 2 anni ago | 2

Solved

How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

oltre 2 anni ago

Submitted

RomeshA/manual-cell-counter
A GUI to make it easy to manually count cells

How to create an empty array of structs?
If you know the fields in advance, you can create a 0x0 struct array WITH fields using the syntax s = struct('a',{},'b',{})...

oltre 6 anni ago | 17

Estimating the error of a trapezoid method integral
I'm going to revive this just because I think this problem is fairly widespread and there isn't much available by way of resourc...

circa 7 anni ago | 3

Solved

you just measured its surface area, that is the input.

circa 7 anni ago

Solved

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

circa 7 anni ago

Solved

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

circa 7 anni ago

Solved

Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

circa 7 anni ago

Solved

Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

circa 7 anni ago

Submitted

Keyboard replacement with stack trace
Display a stack trace showing where keyboard was used

Storing persistent variable in a standalone GUI
There is a likely reason that you have this problem. When the program is compiled, you might have included the XML file inside t...

oltre 7 anni ago | 0

Solved

Find best placement for ordered dominoes (harder)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

circa 8 anni ago

Solved

Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

circa 8 anni ago

Solved

Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

circa 8 anni ago

Solved

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

circa 8 anni ago

Solved

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

circa 8 anni ago

Solved

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

circa 8 anni ago

Solved

The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

circa 8 anni ago

Solved

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

circa 8 anni ago

Solved

surface of a spherical planet
you just discovered its circumference, that is the input.

circa 8 anni ago

Solved

Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

circa 8 anni ago

Solved

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

circa 8 anni ago

Solved

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

circa 8 anni ago

Solved

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

circa 8 anni ago

Solved

Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

circa 8 anni ago

Solved

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

circa 8 anni ago

Solved

<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

circa 8 anni ago

Solved

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

circa 8 anni ago

Solved

Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

circa 8 anni ago