Monday Math Madness #32: The Bigger Plot of Land

mmm

security_fence.jpg

“He who would trade liberty for security, deserves neither liberty nor security.” –Benjamin Franklin

Image and Quote via Digg

The Question

Unfortunately our friends Alice and Bob have unknowingly traded their liberty away and are being fenced inside a rectangular pieces of land on the planet Earth, which is assumed to be a perfect sphere of radius 3950 miles.

Alice and Bob are granted one last choice: To decide which plot of land they want to be fenced in.

Both plots of land are bounded by four fences.

Land 1: Two fences run in an exact north-south direction and the other two run in an exact east–west direction. The north-south fences are exactly 10 miles long and east–west fences are exactly 20 miles long.

Land 2: Similar to Land 1, but the north–south fences are 20 miles long and the east–west fences are 10 miles long.

Can you help Alice and Bob to figure out which plot of land has the greater area?

Note:
- Alice and Bob can choose where to place the fences.

Continue Reading »

delicious bookmark StumbleUpon technorati Digg reddit icon rss icon

MATLAB - Exporting Data using XLSWRITE

Matlab Logo Microsoft Excel is a common data format, so it’s a good idea to learn how to work with it in the MATLAB environment. Exporting data to the Excel format can be incredibly easy, but there are also some nuances that will be discussed. There are a couple of ways to export data to Excel format, and we’ll discuss how to use the XLSWRITE command to do it.

Contents

XLSWRITE - A Simple Example

The simplest example of using XLSWRITE is when you are dealing strictly with numerical data. Let’s generate some sample data:

%generate the sample data
data = [
    17    24     1     8    15
    23     5     7    14    16
     4     6    13    20    22
    10    12    19    21     3
    11    18    25     2     9];

Now, using the following command:

%write the data to an Excel File
xlswrite('myDataFile.xls', data);

This command writes the data to myDataFile.xls into the current MATLAB directory. If you go there, and open up the file, you’ll see the following:

xlswrite example

Alternatively, you can also specify the full path where you want to write the file too. This is useful so that you don’t have to change directories when writing data. See this post on avoiding the CD command for more information on this topic. Make sure that the directory where you want to write to exists, or else MATLAB will spit out an error

%write the data to a specific location
xlswrite('C:\blinkdagger\myDataFile.xls', data);

Continue Reading »

delicious bookmark StumbleUpon technorati Digg reddit icon rss icon

Blinkdagger joins The MathWorks Book Program

books_program_logo.gif
In early March, we submitted an application to The MathWorks Book Program in hopes that The MathWorks would lend their support on a book project that we had in mind. On April 3rd, we received an e-mail from the The MathWorks Book Program that accepted our application!

What exactly is The MathWorks Book Program?

The MathWorks Book Program is a collaborative effort between writers and The MathWorks. In this program, The MathWorks provides their support to writers who are planning on writing a book based on MATLAB®, Simulink®, or other MathWorks™ products. The MathWorks facilitates the book-writing process so that writers can focus on developing their book, and less time worrying about adminstrative issues

What is the Book going to be about?

We haven’t quite yet finalized what the book will be about, but there is a good chance that it will focus on creating and developing GUIs. A lot of the feedback we have received from our GUI tutorials have been favorable, and we field a fair amount of questions regarding GUI design. If anyone has any thoughts they would like to share, we’d love to hear them.

When will the Book be finished?

Since this is the first time that we’ve taken on such a project, we have no idea how long the process will take. My initial thought was that it would take 9 months. I have no idea if that is too little time, or if it is too much. Only time will tell. We will certainly provide updates on how the book is progressing!

Hey, I want to Write a Book Too!

If you’re planning on writing a book, or have some good ideas about a book that you might want to write, you should check out the Book Program.

delicious bookmark StumbleUpon technorati Digg reddit icon rss icon

Undocumented MATLAB Tips by Yair Altman

yair.png

Recently, Yair has started up his own MATLAB blog at http://undocumentedmatlab.com. Yair Altman has been a valuable contributer on the MATLAB File Exchange for the past couple of years. In fact, his UISplitPane submission was recently chosen as the File Exchange Pick of The Week.

Opposites Attract

While Yair’s website is relatively new, there’s a bunch of handy information there that you probably won’t find elsewhere on the web (and that includes the official MathWorks documentation!). One of the reasons why I like his site is because it goes beyond the borders and fringes of normal everyday MATLAB. Regardless of your MATLAB knowledge, I highly recommend that you take a gander at his offerings.

At Blinkdagger, we focus mainly on the beginner MATLAB material. At Yair’s site, you’re going to find some pretty advanced topics that are covered. I find the contrast quite refreshing. For instance, in Yair’s most recent post on Button Customization, he discusses the intricacies of what one can accomplish with a simple push button. So if you’re looking for a more advanced flavor in MATLAB, head on over to Yair’s site and take a gander.

Yair and Blinkdagger Tag Team

In the near future, we hope to have Yair guest blog here for us at Blinkdagger. If anyone has any feedback or ideas on what they would like to see from Yair, please leave us a comment!

delicious bookmark StumbleUpon technorati Digg reddit icon rss icon

Monday Math Madness #31: A Problem Dealing with i

mmm

Here’s the latest offering in the Monday Math Madness series:

Simplify the following expression:
MMM 31

HINT: The answer is a real number!

Original contest link at wildaboutmath.com.

Rules for the contest

1. Email your answers with solutions to mondaymathmadness at gmail dot com.
2. Only one entry per person.
3. Each person may only win one prize per 12 month period. But, do submit your solutions even if you are not eligible.
4. Your answer must be explained. You must show your work! Wild About Math! and Blinkdagger will be the final judges on whether an answer was properly explained or not.
5. The deadline to submit answers is Tuesday, May 5, 12:01AM, Pacific Time. (That’s Tuesday morning, not Tuesday night.) Do a Google search for “time California” to know what the current Pacific Time is.)
6. The winner will be chosen randomly from all timely well-explained and correct submissions, using a random number generator.
7. The winner will be announced Friday, May 8, 2009.
8. The winner (or winners) will receive a Rubik’s Revolution or a $10 gift certificate to Amazon.com or $10 USD via PayPal. For those of you who don’t want a prize I’ll donate $10 to your favorite charity.
9. Comments for this post should only be used to clarify the problem. Please do not discuss ANY potential solutions.
10. I may post names and website/blog links for people submitting timely correct well-explained solutions. I’m more likely to post your name if your solution is unique.

delicious bookmark StumbleUpon technorati Digg reddit icon rss icon

« Prev - Next »