Solved


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

12 days ago

Solved


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

12 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...

12 days ago

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

12 days ago

Solved


kmph to mps
convert kilometer per hour to meter per second

12 days ago

Solved


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

12 days ago

Solved


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

12 days ago

Solved


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

12 days ago

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

12 days ago

Solved


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

12 days ago

Solved


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

12 days ago

Solved


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

12 days ago

Solved


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

12 days ago

Solved


Equal to their cube
Tell me three real numbers that are equal to their cubes?

12 days ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

12 days ago

Solved


Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<https://imgur...

12 days ago

Solved


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

12 days ago

Solved


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

12 days ago

Solved


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

12 days ago

Solved


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

12 days ago

Solved


Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.

12 days ago

Solved


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

12 days ago

Solved


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

12 days ago

Solved


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

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

12 days ago

Solved


Return the first and last characters of a character array
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

12 days ago

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

12 days ago

Solved


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to find the logical indices o...

12 days ago

Solved


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

12 days ago

Solved


Check if number exists in vector
Return 1 if number a exists in vector b otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,2,3]; Returns 1.

12 days ago

Load more