Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

6 days ago

Solved


Slope of the line passing through two points
Determine the slope of a line passing through the points a=[x1 y1] and b=[x2 y2].

6 days ago

Solved


Print true if
all elements are larger than 5 a=[1 3 5 8 6]; b=[6 6 6 6 6]; function(a) should be false, and function(b) will be tru...

6 days ago

Solved


Save variables
a=[1] Save variable a that is located in workspace into current folder. File name should be 'a.mat'

6 days ago

Solved


Box
Give the volume of a box, x is equal to the body diagonal.

6 days ago

Solved


N-plicate me
Modified version of duplicate and triplicate me. Repeat elements of input vector with given input n Ex: input = [1 2 3 4 5...

6 days ago

Solved


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

6 days ago

Solved


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

6 days ago

Solved


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

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

6 days ago

Solved


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

6 days ago

Solved


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

6 days ago

Solved


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

6 days ago

Solved


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

6 days ago

Solved


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

6 days ago

Solved


Usage of varargout
This Challenge is to demonstrate usage of varargout. Output a cell array using varargout of magic squares of size 1 thru n. ...

6 days ago

Solved


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

6 days ago

Solved


to the 2 all elements
to the 2 all elements

6 days ago

Solved


the average value of the elements
Calculate the average value of the elements in the array

6 days ago

Solved


Double all elements in the array
Duplicate all elements in the array

6 days ago

Solved


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

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

24 days ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

24 days ago

Solved


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

24 days ago

Solved


GJam: 2013 China Event: Cannon Angle
This Challenge is derived from <http://code.google.com/codejam/contest/2933486/dashboard#s=p1 GJam 2013 China Captain Hammer>. T...

24 days ago

Solved


SatCom #7: Thermal Noise in a Receiver
Satellite and Space Engineering - Problem #7 This is part of a series of problems looking at topics in satellite and space comm...

24 days ago

Solved


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

24 days ago

Solved


サイコロを作ろう
1から6までの独立かつランダムな数値を返すような関数を作成しましょう。 例: >> [x1,x2] = rollDice(); と入力すると x1 = 5 x2 = 2 のような解を返します。

24 days ago

Solved


Min of a Matrix
Return the minimum value in the given matrix.

24 days ago

Solved


kmph to mph converter
Convert the speed in miles/hour to km/hour.

24 days ago

Load more