Code covered by the BSD License  

Highlights from
nflcolor

5.0

5.0 | 1 rating Rate this file 2 Downloads (last 30 days) File Size: 2.56 KB File ID: #16280
image thumbnail

nflcolor

by Alan Bindemann

 

07 Sep 2007 (Updated 12 Sep 2007)

Return NFL color values by team or city name

| Watch this File

File Information
Description

In honor of the start of the 2007/2008 season, a function that provides RGB color values for all 32 NFL teams...

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
10 Sep 2007 John D'Errico

(smile)

Defaulting to the Jets over the Giants is a serious flaw.

Slightly more seriously, from a coding point of view the code could have been more simply written, yet be more flexible using either strmatch or strncmp. This would allow the user to shorten the names. For example, you could then call it as nflcolor('cinc') and not get an error as long as the shortening was unambiguous.

This would also simplify the code, allowing it to be written as just an index into an array of colors, rather than as a massive switch/case statement.

17 Sep 2007 John D'Errico

I'll admit, I'm still wondering why Matlab needs an NFL color mapping utility. 8-)

Given that, I like how the author has cleaned it up. In context, its a good code if this is something that you have a need for as a user.

I was debating whether this code was worth a rating of 4 or 5. Initially, I wanted to make it a 4, since it does not seem to be of real value to many people. On the other hand, this is by far the best code I've seen so far on the file exchange to supply the colors of all NFL teams. In that context, I'll give it a 5 rating. ;-)

14 May 2008 Max Zelin

Well, I know nothing about this site and my sister was the mathematical genious in MY family, but having been asked to design a piece of jewelry using one of the team's colors, I came across this page. The red is kind of "questionable", and if I was one to download files indiscriminantly to my computer, I'm sure I am one of the few people to whom this WOULD be of value. Matlab, maybe not so much, but ME, yes. Didn't take advantage of it though, not sure what kind of file it is, but I WOULD love to know the RGB color value of the red in the Bucs colors. . .would help me know what type of red to use when I design the piece. . . .this girly-girl doesn't plan to EVER attend a football game of any kind. . . . .

Please login to add a comment or rating.
Updates
12 Sep 2007

Addressed issues raised by reviewer. Code no longer uses a case statement, code now allows for partial matches for team city and name. Also added an sample image...

Tag Activity for this File
Tag Applied By Date/Time
annotation Alan Bindemann 22 Oct 2008 09:26:06
customization Alan Bindemann 22 Oct 2008 09:26:06
plotting Alan Bindemann 22 Oct 2008 09:26:06
color Alan Bindemann 22 Oct 2008 09:26:06
football Alan Bindemann 22 Oct 2008 09:26:06
graphics Alan Bindemann 22 Oct 2008 09:26:06

Contact us at files@mathworks.com