Community Profile

photo

Ryan Duffy


Last seen: 13 días ago
75 total contributions since 2021

Ryan Duffy's Badges

  • Community Group Solver
  • Introduction to MATLAB Master
  • Commenter
  • Promoter
  • Solver

View details...

Contributions in
View by

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

17 días ago

Solved


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

17 días ago

Solved


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

17 días ago

Solved


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

17 días 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...

17 días ago

Solved


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

17 días ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

17 días ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

17 días ago

Solved


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

17 días 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...

17 días ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

17 días ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

17 días ago

Solved


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

17 días ago

Solved


Find max
Find the maximum value of a given vector or matrix.

17 días ago

Solved


Inner product of two vectors
Find the inner product of two vectors.

17 días ago

Solved


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

17 días ago

Solved


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

17 días ago

Solved


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

17 días ago

Solved


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

17 días ago

Solved


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

17 días ago

Solved


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

17 días ago

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

17 días ago

Solved


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

17 días ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

17 días ago

Solved


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

17 días ago

Solved


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

17 días ago

Solved


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

17 días ago

Solved


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

17 días ago

Solved


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

17 días ago

Load more