Gelöst


Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...

mehr als 8 Jahre vor

Gelöst


Decide whether determinant is zero.
Given a 3 x 3 matrix, find the determinant. Let y = true if the determinant is zero, and let y = false if the determinant is no...

mehr als 8 Jahre vor

Gelöst


Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function

mehr als 8 Jahre vor

Gelöst


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

mehr als 8 Jahre vor

Gelöst


Rotate matrix by -90 degrees
Rotate a Matrix by -90 degrees Example: X = 1 2 3 4 5 6 7 8 9 output = 7 4 ...

mehr als 8 Jahre vor

Gelöst


Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...

mehr als 8 Jahre vor

Gelöst


Matlab Basics II - Determine if an array has a 3rd dimension
For an array A, determine whether it has 3 dimensions, return 0 if x is only 2D, and 1 if x is 3D

mehr als 8 Jahre vor

Gelöst


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

mehr als 8 Jahre vor

Gelöst


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

mehr als 8 Jahre vor

Gelöst


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

mehr als 8 Jahre vor

Gelöst


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

mehr als 8 Jahre vor

Gelöst


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

mehr als 8 Jahre vor

Gelöst


Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

mehr als 8 Jahre vor

Gelöst


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

mehr als 8 Jahre vor

Gelöst


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

mehr als 8 Jahre vor

Gelöst


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

mehr als 8 Jahre vor

Gelöst


Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

mehr als 8 Jahre vor

Gelöst


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: <http://...

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


Eye Squared
For a positive integer |n| create the identity matrix with |n| elements. In case it is not possible to produce an identity ma...

mehr als 8 Jahre vor

Gelöst


Largest Prime Number
Given a matrix X, find the largest prime number in X.

mehr als 8 Jahre vor

Gelöst


Size of this cup?
The given vector has diameter of the cup in mm sampled at micrometer increments in depth from top to bottom, need output in cc a...

mehr als 8 Jahre vor

Gelöst


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

mehr als 8 Jahre vor

Gelöst


Bruh
Return 'bruh'.

mehr als 8 Jahre vor

Gelöst


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

mehr als 8 Jahre vor

Gelöst


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

mehr als 8 Jahre vor

Gelöst


angle in regular polygon
Make a function which returns measure of interior angle in x-side regular polygon. x is as input. Please pay attention, that 1 ...

mehr als 8 Jahre vor

Gelöst


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

mehr als 8 Jahre vor

Gelöst


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

mehr als 8 Jahre vor

Gelöst


Parallel vectors
Return true or false depending on whether 2 vectors are parallel or not. Vectors can be 2 or 3 dimensional. The origin is not c...

mehr als 8 Jahre vor

Mehr laden