Solved


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

meer dan 6 jaar ago

Solved


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

meer dan 6 jaar 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]

meer dan 6 jaar ago

Solved


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

meer dan 6 jaar 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...

meer dan 6 jaar 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...

meer dan 6 jaar ago

Solved


Will there be a new leader?
Simply answer the title.

meer dan 6 jaar 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...

meer dan 6 jaar ago

Solved


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

meer dan 6 jaar 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 ]

meer dan 6 jaar 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]

meer dan 6 jaar ago

Solved


modulus of a number
find the modulus of a given number

meer dan 6 jaar ago

Solved


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

meer dan 6 jaar ago

Solved


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

meer dan 6 jaar 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

meer dan 6 jaar ago

Solved


Add two numbers
Add two numbers (For beginners)

meer dan 6 jaar ago

Solved


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

meer dan 6 jaar 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...

meer dan 6 jaar 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...

meer dan 6 jaar 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...

meer dan 6 jaar ago

Solved


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

meer dan 6 jaar 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...

meer dan 6 jaar 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. ...

meer dan 6 jaar ago

Solved


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

meer dan 6 jaar 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...

meer dan 6 jaar ago

Solved


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

meer dan 6 jaar 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...

meer dan 6 jaar 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

meer dan 6 jaar 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]...

meer dan 6 jaar 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...

meer dan 6 jaar ago

Load more