A résolu


Cookie Cutters
Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the large...

environ 2 ans il y a

A résolu


Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

environ 2 ans il y a

A résolu


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

environ 2 ans il y a

A résolu


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

environ 2 ans il y a

A résolu


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

environ 2 ans il y a

A résolu


frame of the matrix
Given the matrix M, return M without the external frame.

environ 2 ans il y a

A résolu


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

environ 2 ans il y a

A résolu


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

environ 2 ans il y a

A résolu


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

environ 2 ans il y a

Problème


Determine pressure altitude using field elevation and altimeter setting
Given an airfield's elevation in feet (ft) and the current altimeter setting in inches of mercury (inHg), calculate the pressure...

environ 2 ans il y a | 0 | 21 solveurs

Problème


Determine ground distance from an aircraft to a DME station
In aviation, distance measuring equipment (DME) uses radio signals to determine slant distance from an aircraft to a ground stat...

environ 2 ans il y a | 0 | 25 solveurs

A résolu


Sum the two halves of an array with an even number of elements
given an array of an even number of elements, sum the front and back half of the array and return the sums as an array For exam...

environ 2 ans il y a

A résolu


Breaking Out of the Matrix
Do you want to take the Red Pill, or the Blue Pill? If you take the Blue Pill, you will simply pass along to the next problem...

environ 2 ans il y a

A résolu


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

environ 2 ans il y a

A résolu


Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

environ 2 ans il y a

A résolu


Write c^3 as sum of two squares a^2+b^2
write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero. For example 5^3 = 2^2 + 11^2 5...

environ 2 ans il y a

A résolu


Sums of Multiple Pairs of Triangular Numbers
This is a follow-up to <https://www.mathworks.com/matlabcentral/cody/problems/44289 Problem 44289> - Find two triangular numbers...

environ 2 ans il y a

A résolu


Spot the First Occurrence of 5
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

environ 2 ans il y a

A résolu


5 Prime Numbers
Your function will be given lower and upper integer bounds. Your task is to return a vector containing the first five prime numb...

environ 2 ans il y a

A résolu


I Plead the Fifth
Write a function to provide a yes or no answer to the input string. However, it must plead the 5th amendment (return an empty st...

environ 2 ans il y a

A résolu


Is this is a Tic Tac Toe X Win?
For the game of Tic Tac Toe we will be storing the state of the game in a matrix M. For this game: We would store the state ...

environ 2 ans il y a

A résolu


Inscribed Pentagon?
Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

environ 2 ans il y a

A résolu


Recaman Sequence - I
Recaman Sequence (A005132 - <http://oeis.org/A005132 - OEIS Link>) is defined as follow; seq(0) = 0; for n > 0, seq(n) ...

environ 2 ans il y a

A résolu


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

environ 2 ans il y a

A résolu


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

environ 2 ans il y a

A résolu


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

environ 2 ans il y a

A résolu


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 + 16 ...

environ 2 ans il y a

A résolu


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime numb...

environ 2 ans il y a

A résolu


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

environ 2 ans il y a

A résolu


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

environ 2 ans il y a

Charger plus