문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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]

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

문제를 풀었습니다


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

8개월 전

더 보기