Solved

Box!
Given a box, find the volume of the cube. With each side = a.

mer än 3 år ago

Solved

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

mer än 3 år ago

Solved

Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

mer än 3 år ago

Solved

Reverse a matrix
Its simple. You have to reverse a given matrix.

mer än 3 år ago

Solved

03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

mer än 3 år 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...

mer än 3 år ago

Solved

Will there be a new leader?

mer än 3 år ago

Solved

Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

mer än 3 år ago

Solved

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

mer än 3 år ago

Solved

Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

mer än 3 år ago

Solved

Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

mer än 3 år ago

Solved

modulus of a number
find the modulus of a given number

mer än 3 år ago

Solved

Square root of a number
Write a code that will output the square root of x.

mer än 3 år ago

Solved

Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

mer än 3 år ago

Solved

Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

mer än 3 år ago

Solved

mer än 3 år ago

Solved

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

mer än 3 år ago

Solved

sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

mer än 3 år ago

Solved

Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

mer än 3 år ago

Solved

Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

mer än 3 år ago

Solved

Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

mer än 3 år ago

Solved

Specific toolboxes
Given a string that is the name of a MATLAB toolbox, return true if it is available on the Cody solvers evaluation system, false...

mer än 3 år ago

Solved

random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

mer än 3 år ago

Solved

All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

mer än 3 år 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...

mer än 3 år ago

Solved

Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

mer än 3 år ago

Solved

Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

mer än 3 år ago

Solved

find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

mer än 3 år ago

Solved

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

mer än 3 år ago

Solved

Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

mer än 3 år ago