Solved

Basic commands - Greatest common divisor

Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

2 months ago

Solved

Basic commands - amount of inputs

Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

2 months ago

Solved

Maximum running product for a string of numbers

Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

2 months ago

Solved

Remove and Sort

Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

2 months ago

Solved

Target sorting

Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

2 months ago

Solved

Making change

Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

2 months ago

Solved

Finding perimeter of a rectangle

A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

2 months ago

Solved

01 - Scalar variables

Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

2 months ago

Solved

No Twins?

Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

2 months ago

Solved

vectorization in N

For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

2 months ago

Solved

What percentage?

Calculate the output c as the percentage of a on b for given a and b.

2 months ago

Solved

Basic commands - Least common multiple

Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

2 months ago

Solved

The Answer to Life, the Universe, and Everything

A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

2 months ago

Solved

Mode

Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

2 months ago

Solved

Basic commands - rounding

make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

2 months ago

Solved

Back to basics 18 - justification

Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

2 months ago

Solved

Back to basics 5 - Clipboard

Covering some basic topics I haven't seen elsewhere on Cody. Copy the input string to the clipboard

2 months ago