Risolto


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

13 giorni fa

Risolto


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

13 giorni fa

Risolto


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 giorni fa

Risolto


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

14 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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

14 giorni fa

Risolto


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

14 giorni fa

Risolto


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

14 giorni fa

Risolto


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

14 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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

15 giorni fa

Risolto


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

15 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Risolto


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 giorni fa

Carica altro