Community Profile

photo

Simon Pilgrim


143 total contributions since 2019

Simon Pilgrim's Badges

  • Community Group Solver
  • Promoter
  • CUP Challenge Master
  • Introduction to MATLAB Master
  • Solver

View details...

Contributions in
View by

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

7 days ago

Solved


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

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

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

9 days ago

Solved


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. The element values ...

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

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

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

20 days ago

Solved


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

23 days 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,....

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

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

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

23 days ago

Solved


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

5 months ago

Solved


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

5 months ago

Solved


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

5 months ago

Solved


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

5 months ago

Solved


Replace all odd numbers with NaN
Replace all odd numbers in the vector or matrix with NaN. For example, if x = [1 3 4 5 8 11]; then return y = [NaN Na...

5 months ago

Solved


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

5 months ago

Solved


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

5 months ago

Solved


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

5 months ago

Solved


Equal to their cube
Tell me three real numbers that are equal to their cubes?

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

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

5 months ago

Solved


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

5 months ago

Solved


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

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

5 months ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

5 months ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

5 months ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

5 months ago

Load more