516 total contributions since 2019

commodity risk management

Solved

Back to basics 15 - Benchmark

Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

1 day ago

Solved

Matrix to column conversion

Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

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

1 day ago

Solved

05 - Vector Equations 1

Define the vector _cVec_: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of -0....

1 day ago

Solved

Convert decimal to binary and then generate the minimum binary it can with jumbling

input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

1 day ago

Solved

Which quadrant?

Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

2 days ago

Solved

06 - Matrix Equations 1

Define the vectors _aVec_ and _bVec_ and the matrix _aMat_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http:/...

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

5 days ago

Solved

Squaring Matrix

Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

5 days ago

Solved

Is the input divisible by 3?

Return true if the input is divisible by 3 and false if not.

5 days ago

Solved

Divisible by 2

This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

5 days ago

Solved

Is this is a Tic Tac Toe X Win?

For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

5 days 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 days ago

Solved

Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]

The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

5 days ago

Solved

I Plead the Fifth

Write a function to provide a yes or no answer to the input string. However, it must plead the 5th amendment (return an empty st...

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

5 days ago

Solved

Omit columns averages from a matrix

Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

5 days ago

Solved

Determinant of a 3x3 Matrix

Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.

7 days ago

Solved

Area of a Square

Inside a square is a circle with radius r. What is the area of the square?

7 days ago

Solved

Beat the test suite if you can :)

Solve this problem based on clues in the test suite.

7 days ago

Solved

Freebies anyone? No!!!!

Feel free to copy paste all the tests and voila you solved the problem

7 days ago

Solved

Mann-Kendall Correlation

Write a function that returns the <http://en.wikipedia.org/wiki/Kendall_tau_rank_correlation_coefficient Mann-Kendall> correlati...

7 days ago

Solved

Replace multiples of 5 with NaN

It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

8 days ago

Solved

Angle between two vectors

You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

8 days ago

Solved

All your base are belong to us

Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

8 days ago

Solved

01 - Scalar variables

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

8 days ago