Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...
Octoberfest festival
A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...
約8年 前
解決済み
Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers.
Given a positive in...
約8年 前
解決済み
How to subtract?
*± ± ± ± ± ± ± ± ± ± ±*
* Imagine you need to subtract one...
約8年 前
解決済み
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...
約8年 前
解決済み
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...
約8年 前
解決済み
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://...
約8年 前
解決済み
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.
...
"Cody" * 5 == "CodyCodyCodyCodyCody"
*Alice*: What? *"Cody" * 5 == "CodyCodyCodyCodyCody"*? You've gotta be kidding me!
*Bob*: No, I am serious! Python supports...
約8年 前
解決済み
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...
8年以上 前
解決済み
Vector to 3-Column Matrix
Consider a vector *A* such as
A = [1 2 3 3 4 5 6]
Can you convert this vector to a three-column matrix like this:
...
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...