A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Bruh
Return 'bruh'.

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

Charger plus