Solved

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

mehr als 2 Jahre ago

Solved

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

mehr als 2 Jahre ago

Solved

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

mehr als 2 Jahre ago

Solved

Basic electricity in a dry situation
This is a very hypothetical situation between two individuals in a very dry atmosphere. He came running in rubber boots when...

mehr als 2 Jahre ago

Solved

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

mehr als 2 Jahre ago

Solved

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

mehr als 2 Jahre ago

Solved

Is it really a 5?
A number containing at least one five will be passed to your function, which must return true or false depending upon whether th...

mehr als 2 Jahre ago

Solved

Circumscribed Pentagon?
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/44368 Problem 44368>, your function will be provided with...

mehr als 2 Jahre ago

Solved

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

mehr als 2 Jahre ago

Solved

Is this is a Tic Tac Toe X Win?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

mehr als 2 Jahre ago

Solved

Energy of a photon
Given the frequency F of a photon in giga hertz. Find energy E of this photon in giga electron volts. Assume h, Planck's ...

mehr als 2 Jahre ago

Solved

Octoberfest festival
A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

mehr als 2 Jahre ago

Solved

Polarisation
You have n polarising filters stacked one on top of another, and you know each axis angle. How much light gets passed through th...

mehr als 2 Jahre ago

Solved

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

mehr als 2 Jahre ago

Solved

How to subtract?
* Imagine you need to subtract one number from another using MATLAB. * You will not be using eval for this task. * Given two A...

mehr als 2 Jahre ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

etwa 3 Jahre ago

Channel

Kegerator

etwa 4 Jahre ago

Solved

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

mehr als 4 Jahre ago

Find whether a vector occurs exactly in another vector
This may be a brute force way but MATLAB should be able to handle it with no problem. Just scan the shorter vector across the...

etwa 5 Jahre ago | 1

Question

How do I keep the vertical arrow connected in a text arrow annotation?
When trying to add an text arrow to a plot I can get the text arrow to show up on the plot but the line is disconnected from the...

etwa 5 Jahre ago | 0 answers | 0

### 0

Solved

How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

mehr als 6 Jahre ago

Solved

Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

mehr als 6 Jahre ago

Solved

Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

mehr als 6 Jahre ago

Solved

Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

mehr als 6 Jahre ago

Solved

Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

mehr als 6 Jahre ago

Solved

Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

mehr als 6 Jahre ago

Solved

Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

mehr als 6 Jahre ago

Solved

Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

mehr als 6 Jahre ago

Solved