Solved

given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

ongeveer een jaar ago

Solved

Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

ongeveer een jaar ago

Solved

03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3 (Hint: use *randi*)

ongeveer een jaar ago

Solved

Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

ongeveer een jaar ago

Solved

Calculate the sum of two numbers. Example input = [2 3] output = 5

ongeveer een jaar ago

Solved

Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

ongeveer een jaar ago

Solved

Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

ongeveer een jaar ago

Solved

Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

ongeveer een jaar ago

Solved

Where is she?
Given the numbers 12, 3, 6, 9 Tell where the girl is located. That is: Look to your 3 o'clock = look right Example ...

ongeveer een jaar ago

Solved

De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

ongeveer een jaar ago

Solved

Annoying population
Every year the number of annoying persons in the office triples Found the population, given a(0) and t

ongeveer een jaar ago

Solved

2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

ongeveer een jaar 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...

ongeveer een jaar ago

Solved

Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

ongeveer een jaar ago

Solved

Generate pi using logarithm
Generate pi using logarithm

ongeveer een jaar ago

Solved

Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

ongeveer een jaar ago

Solved

Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

ongeveer een jaar 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...

ongeveer een jaar ago

Solved

What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

ongeveer een jaar ago

Solved

Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

ongeveer een jaar 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

ongeveer een jaar ago

Solved

Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

ongeveer een jaar ago

Solved

07 - Common functions and indexing 5
Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

ongeveer een jaar ago

Solved

Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

ongeveer een jaar ago

Solved

sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...

ongeveer een jaar ago

Solved

Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

ongeveer een jaar ago

Solved

Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

ongeveer een jaar ago

Solved

Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

ongeveer een jaar ago

Solved

MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

ongeveer een jaar ago

Solved

Least common multiple of many numbers
1:6 -> 60

ongeveer een jaar ago