Risolto

Create Combination

Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

9 mesi fa

Risolto

Next lexicographic - permutation

Find next lexicographic - permutation (permutations as it would occur in a dictionary order). E.g: nextP('ABCD') = ABDC If you...

9 mesi fa

Risolto

Area of an equilateral triangle

Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

9 mesi fa

Risolto

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

9 mesi fa

Risolto

Vector creation

Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

9 mesi fa

Risolto

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

9 mesi fa

Risolto

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

9 mesi fa

Risolto

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

9 mesi fa

Risolto

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

9 mesi fa

Risolto

Pizza!

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

9 mesi fa

Risolto

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

9 mesi fa

Risolto

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

9 mesi fa

Risolto

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

9 mesi fa