解決済み


Check Digit - 02
Given a list of ISBN's, check whether they're valid or not. Prev Prob - <https://www.mathworks.com/matlabcentral/cody/problem...

14日 前

解決済み


Check Digit - 01
The International Standard Book Number (ISBN) is a numeric commercial book identifier that is intended to be unique. It used ...

14日 前

解決済み


Symmetric Pair
Given an (n, 2) matrix, remove any symmetric pairs from the matrix. Keep the first occurrence. (2, 3) and (3, 2) are considere...

14日 前

解決済み


another bullseye
create matrix like below -- for x=2, y=[1 1 1 1 1; 1 2 2 2 1; 1 2 3...

14日 前

解決済み


Pixel density
<https://en.wikipedia.org/wiki/Pixel_density Pixel density> tells us how many pixels we can find within a unit of length. And a...

14日 前

解決済み


Doubling elements in a vector (★★)
(copy of prob. 1024) Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] t...

14日 前

解決済み


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

14日 前

解決済み


The Ulam Matrix
The Ulam spiral is simple to describe. On a gridded piece of paper, write down the number 1. Then write successive integers as y...

14日 前

解決済み


Find the index of the first occurrence of a value in a matrix
Given a matrix of scalars, find the first occurrence of -1 in each column. Output NaN for a column which does not contain the va...

14日 前

解決済み


Enclosure Matrix
The problem gives you a positive integer n. You need to create a matrix consisting of n layers of natural numbers; the outermost...

14日 前

解決済み


Rewrite setdiff to account for non-unique values
Setdiff(a,b) is a function that will remove all values of b from a. Sometimes, you need this function to do a little bit extra,...

14日 前

解決済み


Mo money, mo math #2! (★★★)
(adapted from Prob 9 Cody team) You have a matrix for which each row is a person and the columns represent the number of quar...

15日 前

解決済み


COUNT VOWEL 2
The objective of this problem is to determine the number of unique vowels used in the given string. Now count vowels in STRI...

15日 前

解決済み


Remove duplicated triangles
Input T is a triangulation (triplet list of indices -positive integers-, each index refering to a vertex number in a correspondi...

15日 前

解決済み


Draw Dominos
Write a function to draw dominos. The number on each side can range from 0 to 9. For example, for an input of [3,7], your functi...

15日 前

解決済み


Create Truth Table of Size according to input
Create a Truth Table Example: n = 3 output = [0 0 0; 0 0 1; 0 1 0; 0 1 1; 1 0 0; 1 0 1; 1 1 0; 1 1 1]

15日 前

解決済み


Writing Error Messages
Well written functions check inputs to make sure the input is valid. The function ErrorCheck takes three arguments: * a - a s...

15日 前

解決済み


Determine whether one vector is a subset of another
While bumbling through a pair of problems in the Number Theory group, I wrote code to determine whether a vector is a subset of ...

15日 前

解決済み


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

15日 前

解決済み


Keep Only Even Numbers
Given a vector, return a new vector containing only the even numbers in their original order. Example: keep_evens([1 2 3 4 5 6])...

15日 前

解決済み


Redefine the Array if the Elements in the Array are Repeating
Check if the Array has any repeating elements, if there are repeating elements then choose "n" as a number of times you want tha...

15日 前

解決済み


Weird Diagonal Matrix!!
**If you have loved the problem, please like it below(Request)** Given an integer n, create a matrix whose diagonal elements wi...

15日 前

解決済み


Polybius Square
Given a string, calculate the coordinates. Input will be always in lowercase. If string is a sentence then use 0 (zero) to indic...

15日 前

解決済み


Find the next binary palindrome number
We all know, a *palindrome* is nothing but a number or character which remains the same after the forward or backward alteration...

15日 前

解決済み


Suma de Gauss
¿Cuál es la suma de los primeros enteros positivos?

15日 前

解決済み


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

15日 前

解決済み


Calculate the sum of first x natural numbers
Calculate the sum of first x natural numbers for example if n=10 output =1+2+..+10=55

15日 前

解決済み


Complete a geometric sequence
In Cody Problem 59786 minnolina asks us to find the integer that completes a randomly sorted arithmetic sequence with one missin...

15日 前

解決済み


Calculating distance of lightning based on time delay
If we know the time delay between when we see lightning and hear thunder then we can calculate approximate distance(in meters) o...

15日 前

解決済み


Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

15日 前

さらに読み込む