Resuelto


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

más de 4 años hace

Resuelto


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

más de 4 años hace

Resuelto


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

más de 4 años hace

Resuelto


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

más de 4 años hace

Resuelto


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

más de 4 años hace

Resuelto


Array of Ones
Create a 100 X 100 array of ones.

más de 4 años hace

Resuelto


Calculate the volume of the football

más de 4 años hace

Resuelto


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

más de 4 años hace

Resuelto


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

casi 5 años hace

Resuelto


Product of all elements in an array
Compute the product of all elements in an array.

casi 5 años hace

Resuelto


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

casi 5 años hace

Resuelto


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.

casi 5 años hace

Resuelto


convert between ascii and characters
I have seen multiple problems like this but none of them have a robust test suite associated with them. The first input C is ...

casi 5 años hace

Resuelto


Height of a 3D Pyramid
If a pyramid is made with one(1). What will be the height of the pyramid of square shaped base(n*n)? where input is n.

casi 5 años hace

Resuelto


function to compute root mean square of first nn positive odd integers
Write a function called odd_rms that returns orms, which is the square root of the mean of the squares of the first nn positive ...

casi 5 años hace

Resuelto


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

casi 5 años hace

Resuelto


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

casi 5 años hace

Resuelto


Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

casi 5 años hace

Resuelto


Finding sum of even numbers in a vector.
Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

casi 5 años hace

Resuelto


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

casi 5 años hace

Resuelto


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

casi 5 años hace

Resuelto


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

casi 5 años hace

Resuelto


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

casi 5 años hace

Resuelto


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

casi 5 años hace

Resuelto


ASCII code of a leter.
Given the letter, the output will show the corresponding ASCII code.

casi 5 años hace

Resuelto


determine the sum of fraction part for given matrix
determine the sum of fraction part for given matrix a=1.8308 8.9172 6.7537 1.5853 10.2858 5.3804 6.5497 ...

casi 5 años hace

Resuelto


Create a vector of the first n natural numbers (★)
If n = 7, your program should return a vector y, where y = [1 2 3 4 5 6 7].

casi 5 años hace

Resuelto


Even or Odd
Write a function which can tell us if the given value x is odd or even. So if x is even return true and if x is odd return false...

casi 5 años hace

Resuelto


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

casi 5 años hace

Resuelto


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

casi 5 años hace

Cargar más