Answered

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

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

2 years ago | 2

Solved

How to subtract?

*± ± ± ± ± ± ± ± ± ± ±* * Imagine you need to subtract one...

2 years ago

Submitted

RomeshA/manual-cell-counter

A GUI to make it easy to manually count cells

4 years ago | 4 downloads |

Answered

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',{})...

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',{})...

6 years ago | 16

Answered

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

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

6 years ago | 2

Solved

radius of a spherical planet

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

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

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

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

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

7 years ago

Submitted

Keyboard replacement with stack trace

Display a stack trace showing where keyboard was used

7 years ago | 0 downloads |

Answered

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

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

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

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

8 years 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!...

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

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

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

8 years 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".

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

8 years ago

Solved

surface of a spherical planet

you just discovered its circumference, that is the input.

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

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

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

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

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

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

8 years ago

Solved

Extract leading non-zero digit

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

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

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

8 years ago