Community Profile

photo

Ron Larham


BAE Systems

56 total contributions since 2018

Dogsbody

Contact

Ron Larham's Badges

  • Commenter
  • Solver

View details...

Contributions in
View by

Solved


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

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

9 giorni ago

Solved


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

9 giorni ago

Solved


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

9 giorni ago

Solved


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

9 giorni ago

Solved


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

9 giorni ago

Solved


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

9 giorni ago

Solved


Convert radians to degrees
Given input in radians, output to degrees

9 giorni ago

Solved


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

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

11 giorni ago

Solved


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

11 giorni ago

Solved


Large Sum (inspired by Project Euler 13)
Your function will be provided an arbitrary number of numbers of arbitrary sizes as a cell array of strings. Some numbers will b...

16 giorni ago

Solved


Project Euler: Problem 16, Sums of Digits of Powers of Two
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^N? Thanks ...

16 giorni ago

Solved


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

10 mesi ago

Solved


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

10 mesi ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

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

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

10 mesi ago

Solved


radius of a spherical planet
You just measured its surface area, that is the input.

10 mesi ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

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

10 mesi 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".

10 mesi ago

Solved


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]

10 mesi ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

10 mesi ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

10 mesi ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

10 mesi ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

10 mesi ago

Solved


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

11 mesi ago

Solved


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

11 mesi ago

Solved


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

12 mesi ago

Load more