A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

3 mois il y a

A résolu


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

3 mois il y a

A résolu


03 - Matrix Variables 5
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

3 mois il y a

A résolu


Max of a Vector
Write a function to return the max of a vector

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

3 mois il y a

A résolu


kmph to mps
convert kilometer per hour to meter per second

3 mois il y a

A résolu


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

3 mois il y a

A résolu


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

3 mois il y a

A résolu


Determine the square root
Determine the square root of the value the user has entered, n.

3 mois il y a

A résolu


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

3 mois il y a

A résolu


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

3 mois il y a

A résolu


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

3 mois il y a

A résolu


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

3 mois il y a

A résolu


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

3 mois il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

3 mois il y a

A résolu


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

3 mois il y a

A résolu


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

3 mois il y a

A résolu


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

3 mois il y a

A résolu


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

3 mois il y a

A résolu


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

3 mois il y a

A résolu


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

3 mois il y a

A résolu


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

3 mois il y a

Charger plus