Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...
5年以上 前
解決済み
Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody.
Switch the byte order of the input (i.e. if little-endian -> big...
5年以上 前
解決済み
Back to basics 3 - Temp Directory
Covering some basic topics I haven't seen elsewhere on Cody.
Return a string that is the path to the system's current temp di...
5年以上 前
解決済み
Hard limit function
Classify x data as
if x>=0 then y=1
if x<0 then y=0
Example
x = [ -2 -1 0 1 2]
y = [ 0 0 1 1 1]
Oh Zero Zero Zero!!!
Hello all,
So you have to find the largest section of zeros in a vector and then find the length of those zeros and there start...
5年以上 前
解決済み
Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be.
Ex...
Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...
Word Distance - Sum
Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...
5年以上 前
解決済み
Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand
Add a vector to a matrix
Given a matrix |mat| of size |mXn| and a row vector |v| of size |1Xs|, return a matrix with |m+1| rows that conatains |mat| over...
6年弱 前
解決済み
~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator|
Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...
Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation.
Note: the number 4 has no circ...
6年弱 前
解決済み
Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...