It may look like a dirty sock, but I promise that it’s not.
Paul Kassebaum, who recently told us about the Battlebots competition, made this with a 3D printer. One of the cool things about 3D printing is that you can start with a shape that exists only in an abstract mathematical sense, and then you can extrude it onto the palm of your hand.
So here’s a hint. The shape above is related to another shape that Paul printed.
Maybe you already figured that out. But what is the relationship between the two shapes? Over the next couple of posts, Paul is going to tell us the story of these two shapes: how they were generated as abstract objects, and how they were given physical form in the real world.
Robot competitions are in the air these days, what with the recent Battlebots competition in Massachusetts and the earlier Student Robot Challenge in the UK. Here’s an update from Tanya Morton, who ran the event in England.
A few weeks ago, MathWorks hosted a Student Robot Challenge at our new office building in Cambridge. The event was a great success. The students had fun and learned plenty about modelling, simulation, control design, code generation, and teamwork. I wrote a blog about the event here:
It has been a while since we last talked about displaying data tips on MATLAB Mobile.
The data cursor feature has since then evolved from tap-and-hold invocation to a more prominent ‘Show Data Cursor’ button. Tapping on this button brings up the crosshair. Move the crosshair to any location on the figure to display the coordinates of that location.
We’re happy to announce that the latest release of MATLAB Mobile for Android supports this feature, much like its iOS counterpart.
Tap on Show Data Cursor Position crosshair at desired location
This week I welcome Dr. Paul Kassebaum to the blog. Paul is a physicist at MathWorks working to engage the public with engineering and science. He fell in love with engineering at the Cooper Union for the Advancement of Science and Art, and then became obsessed with physics at the Worcester Polytechnic Institute, where he earned a Ph.D. specialized in quantum mechanics. His latest projects at MathWorks include designing a digital interactive museum exhibition at the Ecotarium in Worcester and managing a sponsorship between MathWorks and Artisan’s Asylum. His work at Artisan’s Asylum focuses on using MATLAB to create 3D prints that help one literally grasp abstract math and physics concepts.
Build Your Own Autonomous Battlebot
A massive maker space. Cutting-edge software. Expert mentors. And just one week to craft the most devastating robot possible.
by Dr. Paul Kassebaum
MathWorks is teaming up with Artisan’s Asylum to wage a robot battle accelerated by Simulink’s run on target hardware capabilities and the computer controlled manufacturing tools at Artisan’s Asylum, the largest maker space on the east coast. The fight will serve as the grand finale of the Cambridge Science Festival on Sunday April 21st at the Center for Arts at the Armory, and will be free and open to the public. The contest begins on Sunday April 14th at Artisan’s Asylum, where teams will design their robots over the course of a week. To sign up and for more info, have a look at designchallengebattlebots.com.
Sergio Biagioni is working at MathWorks to develop a Simulink framework to aid high school and undergraduate contestants in their algorithm designs. Each robot will be equipped with an Arduino Mega 2560, a line sensor, touch sensors, sonar, and a wireless feed akin to GPS sent from an eye in the sky. The overhead camera will use the Computer Vision System Toolbox to locate each robot and its orientation based on colored stickers applied to the chassis.
Rob Masek, facilities manager of Artisan’s Asylum, is organizing the tournament, drawing on his experience as a (three time) contestant on Comedy Central’s BattleBots and as an organizer of several US FIRST Robotics competitions and a home-brew robot competition called Pound of Pain. I’m confident he’ll be able to replicate his previous successes.
Gui Cavalcanti, the founder of Artisan’s Asylum, is whipping up a robot chassis to help Sergio develop the Simulink framework all of the contestants will use. This prototype robot will be made of the same components available to the contestants, and will be offered up to the contestants to help them jump right into software development before their own chassis are fully operational. While the robots in this competition will have wheels, most of Gui’s robots have more than their fair share of legs.
Stay tuned for more details as the story progresses!
This week I’d like to introduce guest blogger Dr Tanya Morton. Tanya leads the Application Engineering team in the UK, helping customers in industry and academia to apply MATLAB & Simulink to their technical, business and educational challenges. She is keen to encourage more people to enjoy lifelong careers in science, technology, engineering and mathematics. You can find Tanya on Twitter and LinkedIn.
The MathWorks Student Robot Challenge
by Dr. Tanya Morton, MathWorks UK
Earlier this year a colleague and I were bouncing around ideas for ways to do more outreach with the local student community. He pointed behind him and said, “Why don’t we make use of the empty space in the new office to host a robot contest?” An idea was born…
Last Friday, this idea came to fruition when MathWorks hosted a Student Robot Challenge. Nine teams from the University of Cambridge participated in the contest. The challenge was to develop a controller for a LEGO MINDSTORM NXT robot to make it visit a set of 12 locations on an arena in the shortest time possible.
After a briefing, the students started working their way through short tasks designed to bring them up to speed with Simulink, the principles of controller design, and the process of generating code to run on the robot. Within five minutes, you could hear the first robot spinning on the spot.
In the afternoon, the students explored a variety of navigation and control strategies, which they tested using a combination of simulation and hardware testing on their robot.
The day ended with a final contest where the teams competed against each other to navigate to the most locations in the shortest time. Team names were picked out of the hat to decide the running order for the final contest. The first to go was the QED-grad team, an experienced team of PhD engineering students. The team successfully hit all 12 locations in a time of 1 minute and 41.3 seconds. Their robot left each location quickly, but tended to spiral around the next target rather than approach it directly.
The LEGO robot with positioning ball used in the final arena
Five of the next seven teams were not able to complete the course within the 3-minute time limit. One of these teams was QED-’12, a team of first-year undergraduate engineers who had been taught to program LEGO by the QED-grad team. Briefly, it seemed that the youngest team in the competition were going to beat their lab demonstrators; however, their robot stopped at the 11th point because they had forgotten to program in the 12th. An important lesson learned! Only the team of PhD mathematicians on Team CCA came close to the time of the QED-grad team with a time of 1 minute and 44.5 seconds.
The last team to go was MatLads, with its leader Richard Peach, a 3rd year undergraduate engineer. MatLads’ robot moved neatly around the course to knock the QED-grad team off the top spot to win by a mere 1.6 seconds!
Paths taken by the fastest two robots (click to see a larger image)
It was an exciting finale to a fun event. The students enjoyed the project-based learning experience and gained some valuable skills to help them in their future careers.
I’ve recently been talking with professors eager to use Cody in the classroom. From these discussions, I’ve learned of seven great reasons to challenge your students with MATLAB practice problems in Cody:
Copy the Cody test suite into desktop MATLAB. Let students write their Cody function with the full power of MATLAB, then paste their answer back into Cody to verify correctness. For example, the Times 2 problem could be solved in MATLAB as follows:
6. Experiment to see how people try to solve your problems
Draw on the MATLAB Central community to confirm your Cody problem challenges exactly the skills you want students to learn. We offer you a large population of MATLAB experts eager to try out the latest MATLAB programming puzzle. Use the Solution Map to see outlier attempts, to better understand how your students could react before offering the practice problem in class.
7. Identify learning gaps
Using the solution map, keep an eye across multiple problems from the point in time you’ve offered in class. Compare these across problems to identify subject matter areas meriting more lecture coverage. For example,
Problem 7: Column Removal
shows a cluster of incorrect attempts worth exploring. You’ll quickly see which topics need follow-up coverage in class.
I’ve also prepared a five minute video to demonstrate the above points. Please let me know how you’ve found Cody helpful.
As Product Manager of MATLAB Central, Bob helps MathWorks hear a collective voice of the community to uncover and address what’s needed most. Please reach out to me at bob.levy(at)mathworks(dot)com with feedback and suggestions.
This week I’d like to introduce guest blogger Joachim Schlosser. Joachim leads the team of Education Technical Specialists in Europe, supporting professors and teaching staff using MATLAB & Simulink in education. His mission is to serve development organizations, universities, professors and engineers in all stages of their career to best leverage their proficiency by finding out what kind of methodology and tools are of greatest use for them. You can find Joachim on Twitter, LinkedIn and Google+.
Dancing in the Spotlight
by Joachim Schlosser
I love trade shows and conferences, because you get the opportunity to speak with people creating very different things all on one day. The Embedded World trade show, held each year end of February in Nuremberg, Germany, is such an event. Every time it is amazing to see the breadth of topics that people approach us on, and it is fun to discuss and find out which of our tools around MATLAB & Simulink can make them successful.
Dancing: Enter Anna.
People might stop because they see our hostess Anna making the cute little Nao robot dance, but they come into discussion because they get the vision about what they could achieve themselves. What they see on the booth is just a catalyst for people’s own insight and needs, just a starting point to evaluate which tools serve best their applications.
Photo courtesy Joachim Schlosser.
Movement: Enter John.
Enter booth visitor John (not his real name) from Ynapmoc, Inc. (not his real company), a small to mid size manufacturer with 40 years of experience in the area of medical devices (not his real industry). When he approached me, he said he stopped because he noticed we somehow analyze the real picture data, and he was curious to find out more. He then found yet another demonstration in the booth where a Simulink model made an Arduino board with a webcam track and follow a colored ball. Think of it as a stripped down version of this one, but you get the idea.
Now the reason John was curious is because they are abstracting movements of people filmed in their lab to detect anomalies in their muscle tissue functions and provide a self-assessment tool (not his real application). They had been coding it by hand, with little possibility to do fast prototyping, and with additional effort to adapt the functionality each time they got another camera, each time they have another idea to make the algorithm better. To see that he could do video processing in Simulink was a relief to him, since he knew it from his engineering studies. To see additionally that he could real-time prototype on a low cost Arduino board made John enthusiastic.
Grid stability: Enter Lynn.
Enter Lynn (not her real name), engineer from Sunshine Corp (not her real company), who works on electrical energy generators used in production plants as backup to the regular power grid (not her real application). She had seen our offerings around simulating electrical systems and wondered whether this would not just work for simulating an isolated device but the production plant’s power grid as a whole.
Well, it’s not just possible to simulate an entire plant’s grid, Transpower from New Zealand went a bit further and simulated the entire national grid. They do this to calculate the reserve they need to provide in order to maintain grid stability. So, Lynn has made her next step in solving her challenge, discussing the scenario with one of our Application Engineers to find out the exact needs and a plan for implementing the solution.
Now what if you combine both, image processing and control?
3D Imaging: Enter Nao.
Enter Nao (its real name) from Aldebaran (its real company). Nao is the little robot from the beginning of this story. Think of movement. Think of control theory. Think of feedback control. Think of Simulink. And now attach Microsoft® Kinect® with its support in MATLAB & Simulink, one of the many hardware resources for project-based learning. Kinect provides a 3D image of a person, which is transformed into a mesh in MATLAB & Simulink, allowing it to calculate trajectories for the robot. The rest is normal control system theory with Model-Based Design.
You get: A dancing machine being able to mimic movements of a human. A lot of fun in the realms of engineering, science, commercial and education developments, controls, video, data analysis. And lots of nice discussions with bright people of different disciplines who either are already using MATLAB & Simulink or are exploring their way into doing so. To live and breathe their art.
2012 was an eventful year for MATLAB Mobile, with releases for the iPad, the Android platform, and several enhancements to graphics and usability.
To kick off 2013 on a high note, we are making connecting to the cloud even better.
Introducing… MATLAB Cloud Storage
You can now upload MATLAB files and data to MathWorks Cloud and run them from MATLAB Mobile. You can also download your files from the cloud and save them to your computer.
To upload your files, navigate to the MATLAB Cloud Storage page at https://www.mathworks.com/mobile/cloud-storage.html. To access this page, you will need to have a valid MathWorks Account associated with a license that is current on maintenance. You will also need to have created a user ID on MATLAB Mobile.
Once your files have been uploaded, you can execute them from your mobile device running MATLAB Mobile. For more information, please refer to Store MATLAB files on the cloud.
But wait, there’s more!
- When you connect to MathWorks cloud, you can now access all your licensed MathWorks products.
- We’ve also added a customized keyboard for the Android platform, making it easy for you to enter MATLAB commands without having to switch between multiple screens. The keyboard provides easy access to commonly used MATLAB characters like parenthesis, indexing operators, arithmetic operators and the like. You can also access previously entered commands with the touch of a single key. Tapping and holding on selected keys displays additional characters. For instance, a long tap on the ‘.’ key displays the list of characters in blue.
- MATLAB Mobile for iOS now supports iPhone 5 and iPad mini.
Go play around with it and tell me what you find. Shown above is one view: author ID vs. problem ID. It shows patterns of how problem authors contribute. The size of the dots is relative to the number of comments on the problem. That horizontal stripe across this middle at around author_id = 3000 is super contributor (and current Cody front runner) Richard Zapor, who has single-handedly contributed 122 problems!
This tool loads a relatively large (200 KB) data set when it starts up, so please be patient as it loads! Also, please note that this is an experimental tool that works with an archived static data set from February 8, 2013. It won’t reflect changes in Cody after that date.
One of the virtues of a good programmer (as observed by Larry Wall) is laziness. Don’t write code that you don’t have to! In this spirit, the File Exchange is a boon to the lazy. Whenever you sit down to code, listen to the voice that says “someone must have written this already.” Because it’s probably good advice. Sometimes you’ll find exactly what you need on the File Exchange. Done! Other times you might find something that’s close to the right thing, but not quite. In those cases, consider taking what you find and adapting it to your needs… and then consider resubmitting your adapted code to the File Exchange.
It may feel like cheating at first, but the File Exchange has a mechanism to let you acknowledge the person (or people) that you borrowed code from.
When you submit a file to the File Exchange, you come across a section called “License and Acknowledgments.” This gives you a place to mention the other files that helped you create yours, either because you borrowed code from them or because you just want to publicly acknowledge your appreciation of their influence.
Of the more than 17,000 files on the File Exchange, there are 2910 separate acknowledgments like the one mentioned above. In one way or another, 2050 files acknowledge their debt to a total of 1870 inspiring files. If you think of each one of these acknowledgments as a pointer from the inspiring file to the inspired file, then the whole site can be thought of as a directed graph. Consider the example above. The inspiration doesn’t stop with Douglas Schwarz’s file. That one went on to inspire others. Here’s a look at the acknowledgment tree.
In this picture, each box is a different submission labeled with the author’s last name. Isn’t that lovely? It’s exciting to see the “footprints” of good ideas as they move through the site.
These patterns of acknowledgment can be extensive and visually striking. Some of the trees are deep and some are wide. Here’s a wide one that starts with Oliver Woodford’s exportfig.
With our link data, we can figure out which is the single most influential file in terms of link count. And the answer is… one of the oldest files on the site from Christophe Couvreur. Take a look at how wide this one is.
The largest fully-connected subnet of files has over 200 files in it, all of them connected to each other through a series of links, each link a thoughtful token of respect.
If we go from a file-centric to an author-centric view, we can determine the most influential authors. Who has the most acknowledgments considering all the files they submitted (we ignore self-linking for this analysis). In other words, which authors are the most influential?
These people are heroes of the MATLAB Community. They have freely given, and we have all benefited.
I want to see your name on this list!
Let’s say you agree. Let’s say you’re ready to let people start building on your code. How do you start? Paradoxically, a good way to start is by borrowing someone else’s code. You’ll learn good coding practices by borrowing from the best, and you’re likelier to build something worth borrowing by standing on the shoulders of others. You’ll also be bound more deeply into the community. And soon you’ll see how satisfying it is to have someone use your code as a springboard for something wonderful that never would have occurred to you. So give by taking. You’ll be surprised how far it gets you.