Community Profile

photo

Thomas Ayres


Last seen: Today

MBDA UK Ltd

92 total contributions since 2013

Contact

Thomas Ayres's Badges

  • Introduction to MATLAB Master
  • Community Group Solver
  • Promoter
  • Commenter
  • Knowledgeable Level 1
  • First Answer
  • Solver

View details...

Contributions in
View by

Solved


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

ongeveer 2 maanden ago

Solved


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

ongeveer 2 maanden ago

Solved


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

ongeveer 2 maanden ago

Solved


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

ongeveer 2 maanden 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".

ongeveer 2 maanden 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...

ongeveer 2 maanden 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...

ongeveer 2 maanden ago

Solved


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

ongeveer 2 maanden ago

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

ongeveer 2 maanden 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...

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

2 maanden ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

2 maanden ago

Solved


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

2 maanden ago

Solved


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

2 maanden ago

Solved


Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

2 maanden ago

Solved


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

2 maanden ago

Solved


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

2 maanden ago

Solved


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

2 maanden ago

Solved


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

2 maanden ago

Solved


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

2 maanden ago

Solved


Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

2 maanden ago

Solved


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

2 maanden ago

Solved


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

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

2 maanden ago

Solved


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

2 maanden ago

Solved


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

3 maanden ago

Solved


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

3 maanden ago

Solved


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

3 maanden ago

Solved


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

3 maanden ago

Solved


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

3 maanden ago

Load more