Resuelto


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

más de 8 años hace

Resuelto


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

más de 8 años hace

Resuelto


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

más de 8 años hace

Resuelto


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

más de 8 años hace

Resuelto


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

más de 8 años hace

Resuelto


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

más de 8 años hace

Resuelto


Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...

más de 8 años hace

Resuelto


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

más de 8 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 8 años hace

Resuelto


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

más de 8 años hace

Resuelto


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

más de 8 años hace

Resuelto


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

más de 8 años hace

Resuelto


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

más de 8 años hace

Resuelto


Binary Coder
Take an input number and print the binary value of this number.

más de 8 años hace

Resuelto


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

más de 8 años hace

Resuelto


Max of a Vector
Write a function to return the max of a vector

más de 8 años hace

Resuelto


Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero. Example:...

más de 8 años hace

Resuelto


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

más de 8 años hace

Resuelto


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

más de 8 años hace

Resuelto


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

más de 8 años hace

Resuelto


select the primes of a vector
Find the prime numbers in a vector

más de 8 años hace

Resuelto


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

más de 8 años hace

Resuelto


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


square number
Square a number

más de 8 años hace

Resuelto


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

más de 8 años hace

Resuelto


Area of rhombus
Calculate the rhombus area

más de 8 años hace

Resuelto


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

más de 8 años hace

Cargar más