Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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.

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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.

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


square root
Find square root of given number

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Carica altro