Researcher using Matlab tools since 2015

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

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

1 year ago

Solved

Remove the small words from a list of words.

Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

1 year ago

Solved

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

1 year ago

Solved

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

1 year ago

Solved

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

1 year ago

Submitted

metaproperty(className, propertyName)

Retrieve meta.property objects more easily.

2 years ago | 2 downloads |

Submitted

NUM2ENG: Fast number to engineering notation (SI) conversion

Convert numbers to engineering notation.

2 years ago | 3 downloads |

Answered

How can I send multiple commands to same command prompt opened by the first command

Use the system() function and string your commands together, separated by semicolons. system('cmd1; cmd2; cmd3')

How can I send multiple commands to same command prompt opened by the first command

Use the system() function and string your commands together, separated by semicolons. system('cmd1; cmd2; cmd3')

3 years ago | 2

Answered

MATLAB : PROBLEM WITH CELLFUN AND TWO VARIABLES FUNCTION.

Try this: tempoutemp = cellfun( @(network,arr)sim(network,arr), tempwmul,temptemp, 'un',0 );

MATLAB : PROBLEM WITH CELLFUN AND TWO VARIABLES FUNCTION.

Try this: tempoutemp = cellfun( @(network,arr)sim(network,arr), tempwmul,temptemp, 'un',0 );

3 years ago | 0

| accepted

Answered

Observe graphics object added to the axes

Maybe the 'LegendableObjectsUpdated' event could be used for your purposes. I retrieved this from events('matlab.graphics....

Observe graphics object added to the axes

Maybe the 'LegendableObjectsUpdated' event could be used for your purposes. I retrieved this from events('matlab.graphics....

3 years ago | 0

Answered

How do I store data in multiple loops?

Try concatenating the column vectors in the first dimension. Use [x,y] instead of [x;y] or use horzcat(x,y). This only works of ...

How do I store data in multiple loops?

Try concatenating the column vectors in the first dimension. Use [x,y] instead of [x;y] or use horzcat(x,y). This only works of ...

3 years ago | 0

Answered

Difference between String and Value

Different UI elements have different uses for the 'String' and 'Value' property. in 'uicontrol's these properties behave depende...

Difference between String and Value

Different UI elements have different uses for the 'String' and 'Value' property. in 'uicontrol's these properties behave depende...

3 years ago | 0

Solved

An asteroid and a spacecraft

🚀 Imagine a non-relativistic simple situation. Assume positions p0, p1, p2, and p3 are three dimensional Cartesian ...

3 years ago

Solved

Acid and water

⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ Assume that there is a 100 liter tank. It is initially fi...

3 years ago

Solved

Cache me Outside

The test suite includes a simple recursive Fibonacci sequence generator, but it's terribly inefficient. One simple method for im...

3 years ago

Solved

Sums of Distinct Powers

You will be given three numbers: base, nstart, and nend. Write a MATLAB script that will compute the sum of a sequence of both ...

3 years ago

Solved

Pi Digit Probability

Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

3 years ago

Solved

Is it really a 5?

A number containing at least one five will be passed to your function, which must return true or false depending upon whether th...

3 years ago

Solved

Write c^3 as sum of two squares a^2+b^2

write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero. For example 5^3 = 2^2 + 11^2 5...

3 years ago

Solved

Van Eck's Sequence's nth member

Return the Van Eck's Sequence's nth member. For detailed info : <http://oeis.org/A181391 OEIS link> and <https://www.theguard...

3 years ago

Solved

Number of Even Elements in Fibonacci Sequence

Find how many even fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

3 years ago

Solved

5th Time's a Charm

Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...

3 years ago

Solved

"Cody" * 5 == "CodyCodyCodyCodyCody"

*Alice*: What? *"Cody" * 5 == "CodyCodyCodyCodyCody"*? You've gotta be kidding me! *Bob*: No, I am serious! Python supports...

3 years ago

Solved

Extra safe primes

Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

3 years ago

Solved

Is this is a Tic Tac Toe X Win?

For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

3 years ago

Solved

Find the nearest prime number

Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

3 years ago

Solved

The Top 5 Primes

This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

3 years ago

Solved

A Simple Tide Gauge with MATLAB

*∿ ∿ ∿ ∿ ∿ ∿ ∿ ∿* You are standing in a few inches of sea water on a beach. You a...

3 years ago

Solved

Circle/Pentagon Overlap

Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

3 years ago