Solved


Negative matrix
Change the sign of all elements in given matrix.

9 years ago

Solved


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

9 years ago

Solved


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

9 years ago

Solved


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

9 years ago

Solved


Relational operators and row arrays: Overweight baggage
Create a logical indexing array overweightBaggage with true in each location where the corresponding baggageWeight is greater th...

9 years ago

Solved


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

9 years ago

Solved


Find max
Find the maximum value of a given vector or matrix.

9 years ago

Solved


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

9 years ago

Solved


Relational operators: Guessing game
Row array userGuess contains a sequence of user guesses. Create a logical indexing array correctGuess with true in each location...

9 years ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

9 years ago

Solved


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

9 years ago

Solved


surface of a spherical planet
you just discovered its circumference, that is the input.

9 years ago

Solved


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

9 years ago

Solved


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

9 years ago

Solved


find the relation...
if given input is 1, output is 4. if input is 55, output is 3136.

9 years ago

Solved


Find the area of a rectangle if length of the diagonal is given.
if length of a diagnonal in rectangle is 5. Its area is 12.

9 years ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

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

9 years ago

Solved


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

9 years ago

Solved


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

9 years ago

Solved


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

9 years ago

Solved


Compute total cost
A soda costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the numb...

9 years ago

Solved


It's going down. We're finding simbers!
This problem is inspired by Project Euler 520: Simbers. "We define a simber to be a positive integer in which any odd digit, ...

9 years ago

Solved


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

9 years ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

9 years ago

Solved


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

9 years ago

Solved


square root
Find square root of given number

9 years ago

Solved


fly fly away
A fly moves following a predefined sequence of discrete jumps (defined by the vectors _dx_ and _dy_) repeating the same sequence...

9 years ago

Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

9 years ago

Solved


Numbers in extended form
Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

9 years ago

Load more