521 total contributions since 2019

commodity risk management

Solved

another bullseye

create matrix like below -- for x=2, y=[1 1 1 1 1; 1 2 2 2 1; 1 2 3 2...

9 giorni ago

Solved

Calculate days until Christmas

Provided with inputs year, month, day e.g. 2019,11,12, calculate the number of days until the next Christmas day, i.e. the next ...

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

16 giorni ago

Solved

Minefield Sonar

*Background* In mine-hunting games (e.g. Microsoft Minesweeper), the user is provided with a covered grid that, upon a left c...

16 giorni ago

Solved

The Ulam Matrix

The Ulam spiral is simple to describe. On a gridded piece of paper, write down the number 1. Then write successive integers as y...

24 giorni ago

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.

26 giorni 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; ...

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

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

26 giorni 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

26 giorni ago

Solved

Which quadrant?

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

27 giorni 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:/...

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

30 giorni ago

Solved

Squaring Matrix

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

circa un mese ago

Solved

Is the input divisible by 3?

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

circa un mese 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 ...

circa un mese 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. ...

circa un mese 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,...

circa un mese 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...

circa un mese 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...

circa un mese 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...

circa un mese 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 ...

circa un mese ago

Solved

Determinant of a 3x3 Matrix

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

circa un mese ago

Solved

Area of a Square

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

circa un mese ago

Solved

Beat the test suite if you can :)

Solve this problem based on clues in the test suite.

circa un mese ago

Solved

Freebies anyone? No!!!!

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

circa un mese ago