Resuelto


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

5 meses hace

Resuelto


Square root of a number
Write a code that will output the square root of x.

5 meses hace

Resuelto


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

5 meses hace

Resuelto


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

5 meses hace

Resuelto


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

5 meses hace

Resuelto


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

5 meses hace

Resuelto


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

5 meses hace

Resuelto


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

5 meses hace

Resuelto


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

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

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

5 meses hace

Resuelto


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

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

5 meses hace

Resuelto


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

5 meses hace

Resuelto


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

5 meses hace

Resuelto


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

5 meses hace

Resuelto


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

5 meses hace

Resuelto


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

5 meses hace

Resuelto


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

5 meses hace

Resuelto


convert matrix to single column
given any matrix, convert it to single column

5 meses hace

Resuelto


Find the minimum element of the matrix
Example: If x = [3 9; 5 2] then y = 2

5 meses hace

Resuelto


generate a matrix of Legendre polynomials
input = x - the degree of the polynomial output = matrix of Legendre polynomials

5 meses hace

Resuelto


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

5 meses hace

Resuelto


convert the number to binary format & count digits
Convert the given number to the corresponding binary format and count the number of digits in that binary number

5 meses hace

Resuelto


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

5 meses hace

Resuelto


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

5 meses hace

Resuelto


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

5 meses hace

Resuelto


Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

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

5 meses hace

Resuelto


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

5 meses hace

Cargar más