Solved


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

2 months ago

Solved


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

2 months ago

Solved


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

2 months ago

Solved


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

2 months ago

Solved


Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

2 months ago

Solved


y equals x divided by 2
function y = x/2

2 months ago

Solved


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

2 months ago

Solved


Square a Number
Given an input x, return y, which is equal to the square of x.

2 months ago

Solved


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

2 months ago

Solved


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

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

2 months ago

Solved


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

2 months ago

Solved


Get The Square Root Of Number Power (^) Three
Get the Square Root of number Power (^) Three.

2 months ago

Solved


Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provi...

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

2 months ago

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

2 months ago

Solved


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

2 months ago

Solved


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

2 months ago

Solved


Find The Area Of Triangle Using Base & Height
You should find the area of the Triangle using base and height. Good Luck!

2 months ago

Solved


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

2 months ago

Solved


Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.

2 months ago

Solved


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

2 months ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

2 months ago

Solved


Basic Algebra I
You should solve the problem 3X - 2 = 7 by finding the value of X. You must use this array/vector [2 3 7]. GOOD LUCK!

2 months ago

Solved


Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the shorter leg.
Further to the problem 43236, find the length of shorter leg P.S No built-in functions allowed

2 months ago

Solved


Engine Thermal Efficiency
The thermal efficiency of an ideal Otto cycle engine depends only on the compression ratio. A higher compression ratio yields gr...

2 months ago

Solved


Engine torque and RPM
Torque and power are related through rotational speed. Knowing brake power and engine RPM, you can back-calculate the torque del...

2 months ago

Solved


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

2 months ago

Solved


only input
Return the output without writing any code into the function.

2 months ago

Solved


Calculate feeling temperature before climbing a mountain
I sometimes climb a mountain. As is well known, when the altitude becomes 100 (m) higher, the temperature lowers by 0.6 degrees...

2 months ago

Load more