Solved


Function definition: Volume of a pyramid
Define a function CalculatePyramidVolume with inputs baseLength, baseWidth, and pyramidHeight. The function returns pyramidVolum...

11 years ago

Solved


Logical indexing: High scores
Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than 5...

11 years ago

Solved


Concatenating arrays
* Assign studentIDs with concatenated row arrays groupA and groupB

11 years ago

Solved


Column arrays: Transpose a row array
* Construct a row array countValues with elements 1 to endValue, using the double colon operator. * Transpose countValues to re...

11 years ago

Solved


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

11 years ago

Solved


Add 7
Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

11 years ago

Solved


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

11 years ago

Solved


Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

11 years ago

Solved


Integration after derivative
I am working on a model and there is an issue I cannot understand. To simplify look at this schematic. After you derive smth and...

11 years ago

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

11 years ago

Solved


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

11 years ago

Solved


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

11 years ago

Solved


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

11 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

11 years ago

Solved


vector to string
Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

11 years ago

Solved


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

11 years ago

Solved


Adding Cells with numbers defined as strings
Given a cell, with strings representing numbers, add each value. For example: a = {'9','33'}; the output should be: ...

11 years ago

Solved


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

11 years ago

Solved


Keep Only the Upper characters in a string
Keep Only the Upper characters in a string s = 'Sreeram Mohan'; output = SM;

11 years ago

Solved


Find the mode of the given input
Find the statistical <http://en.wikipedia.org/wiki/Mode_(statistics)/ mode> of the given input. Example: If X is matr...

11 years ago

Solved


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

11 years ago

Solved


Find out next state (NS) of T Flip-Flop.
Find out next state (NS) of T Flip-Flop based on previous state (PS), inputs. Learn more about T Flip-Flop theory here: <htt...

11 years ago

Solved


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

11 years ago

Solved


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

11 years ago

Solved


Error handling
If the input is a negative number, generate an error. Otherwise, return the number.

11 years ago

Solved


Divisors for big integer
Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

11 years ago

Solved


Ulam spiral 2: The revenge
Starting from the problem <https://www.mathworks.com/matlabcentral/cody/problems/2644-the-ulam-matrix>, transform the Ulam Matri...

11 years ago

Solved


Function writing test
Tests your ability to write a trivial function.

11 years ago

Solved


Change Vector Value
Change the element of the vector with respect to the element of the direction vector If the element of the direction vecto...

11 years ago

Solved


Average speed for the entire trip
The input is two speeds (for the trip and return trip) and output is average speed. Assume units are consistent, say miles per h...

11 years ago

Load more