Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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.

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Cargar más