Friday, December 18, 2015

Creating a custom formula in Google Sheets to concatenate a range of values with a delimiter

In the past, I have written a little VBA to create an Excel function to do this.  I use it to take a range of cells containing email addresses and make one string containing those addresses delimited by semi-colons suitable for pasting into the TO: field of an email.

Now that I am using Google Sheets more, I was curious if I could do a similar thing.

With a little investigation, I was able to go to Tools | Script Editor and enter the following:

 function CCAT(range, delimiter) {  
  var returnString = '';  
  var rows = range.length;  
  for (r=0; r<rows;r++){  
   var cols = range[r].length;  
   for (c=0; c<cols; c++){  
    returnString += range[r][c]+delimiter;  
   }  
  }  
  return returnString;  
 }  

Once it is saved I can invoke it from my Sheet using something like:

 =CCAT(C2:C25,";")  

Notice that a range like C2:C25 is automatically converted by Sheets into a two dimensional array.

After successfully creating the function, I searched for a similar solution online and found that there are ways to do it that do not require a custom script - see
https://productforums.google.com/forum/?hl=en#!category-topic/docs/how-do-i/FQbzbVK4-i0 , however my script is illustrative if not elegant.

Wednesday, November 4, 2015

Scratch and Binomial Walks

I am at the #bit15 conference and attended the Coding and Math session with @georgegadanidis.  We learned a little Scratch programming.

We did the requisite square and circle creation tasks.  He had some nice connections to higher level math - including extending a two coin toss scenario to the binomial theorem.  At that point, I worked on my program to make the cat do a binomial walk - not realizing that he would have that example later.  I have shared my project at https://scratch.mit.edu/projects/86529699/ and embedded it below:


The cat should start moving when you click the green flag.  In the offline Scratch editor, you can export the list of horizontal positions where 0 is the centre.  I then imported it into Fathom to make a histogram.


Looks pretty binomial to me!

I am using Twitter as part of our #mmmmECOO presentation - my handle is @rossisen.

Thursday, June 11, 2015

How do I Construct these Loci?

If you have two points, A and B,  in the plane and then determine a third point P by measuring the distances to the original two and having the sum of those distances constant, you define an ellipse.

PA + PB = k

Tracing out such a locus is a fairly standard thing that is done in Sketchpad by defining the sum as a segment, creating a point on the segment to partition the length in 2, creating a circle with each partition as a radius, and tracing out the intersections.




What if you have three points, A, B, and C, in the plane and then determine a fourth point P by measuring the distances to the original three and having the sum of those distances be a constant?

PA + PB + PC = k

Here, I have constructed the Fermat Point P[0] which is the point where the sum is a minimum.  Then I traced out three points with the constant sum approximately 10, 12 and 14 units.



I am looking for a more elegant way to trace out the locus corresponding to any given constant sum of distances to the vertices.  I would also like to know what the curve is called and whether there is a way to graph a relation with that shape.

I am calling on the vast readership and commenters to help!

Tuesday, June 2, 2015

An Interactive Version of the Triangle Investigation

In the previous post, I captured movies of my investigation with The Geometer's Sketchpad. Web Sketchpad allows for including an HTML 5 version of the sketch on a webpage, like this one.

Drag the yellow dot, currently on the triangle to trace out the various positions and area of the triangle.

 

Note that I have enforced the maximum side length of 10 in a very strange way. Can you describe what I have done? Can you do it in a similar or better way?

Where do you have to place the yellow dot in order to have an area of 0?

How can you drag the yellow dot to keep the area the same?

What other patterns do you see in the behaviour? (There are lots more in the previous post)

Thursday, May 21, 2015

Investigating Triangles

For some reason, I woke up this morning thinking about triangles.  Particularly triangles with longest side 10 units.  I thought that Sketchpad might be an interesting way to construct said triangles and investigate relationships between the lengths of the other two sides.

You can see that I ended up with a tan triangle on the left and a plot relating the two remaining side lengths.  The following videos step you through the process of creating the sketch and using it to investigate some very interesting questions about the boundary of the region on the right, isosceles triangles, right triangles, and maximal areas.

In Ontario, students in the Grade 9 Applied Level are expected to do investigations like this, although they start with rectangles - which seems more complicated.  They are expected to investigate figures with maximal area as well as 3D shapes.

You can download the sketch, but it is more fun to create it yourself.  I have captured my investigation in case it helps in the 12 videos below.  If you find that you have trouble motivating yourself to watch 12 fascinating videos, you could just watch the last one to get a sense of where the investigation ends up.

(You can click on the title to get the video in a new tab)


Constructing the Triangle
 

Constructing the Point representing Side Lengths

Constructing the x and y segments
 

Tracing the Side Lengths
 

Investigating the Region of Possible Side Lengths

Investigating the Boundaries of the Region

Reasoning about the Equations of the Boundaries

Investigating Isosceles Triangles
 

Investigating More Isosceles Triangles
 

Investigating Right Triangles
 

Triangle in a Circle
 

Investigating Area
 

Friday, April 10, 2015

Two new Learning Tools available

The Ministry Digital Resources Development team is delighted to announce that two new apps, Money by Mathies and Notepad by Mathies, are now available at the App Store, the Google Play Store and for Desktop.  

Please visit www.mathies.ca/LearningTools.php to access them.  

There is also an email list that you can subscribe to if you would like to receive updates about new resources.  Visit http://oame.on.ca/CLIPS/WhatsNewEmailList.html or click the link at the top of the What’s New dialog inside http://mathclips.ca .

The Money by Mathies app allows students to represent values using realistic coin and bill images provided by the Royal Canadian Mint and the Bank of Canada.
  
Money_RepresentAmounts.png

The Notepad by Mathies app allows annotations to be made on top of blank, lined, isometric or grid backgrounds.

photo 4Felicity.PNG


Supports, including wiki pages with sample screen shots, can be accessed using the i button in each app or from http://mathclips.wikispaces.com/MathCLIPS+Tools

American Politics Explained

I just think that this is so right-on and funny to boot!


Yoram Bauman is the world's only stand up economist.

Wednesday, January 21, 2015

The Rekenrek by mathies app

The team that I work with produces digital resources for Math which are catalogued at mathies.ca.  This week we finally are able to add the Rekenrek for mathies app we developed for the App Store (iOS), the Google Play Store (Android) and desktop computers (Flash-enabled browsers).



The rekenrek is a powerful tool for helping students develop early number concepts.  It can be used to support the learning of addition and multiplication facts by helping students understand different ways these values can be constructed.  Information about how to use the app can be found by clicking on the i button within the app which provides a link to a wiki page with informative screenshots, links to PDF supports and two how-to videos.  It has been really rewarding working with primary educators to understand how learning tools can help students with skills like subitizing which as a secondary teacher I had no idea about.

One feature that is unique about our app is the annotation tool (accessed using the pencil icon) which allows students to draw on the stage and explain their thinking.  It is, in fact, a drawing app in its own right.  You could delete all the rekenrek rods and use it to draw on the screen.  We plan to add the annotation tool to all of our future apps.  One of the next ones under development is a notebook tool which is simply the annotation tool together with some stock backgrounds simulating a plain sheet of paper, grid paper and isometric dot paper.

The app was developed using Flash CS 6 and its export to iOS and Android AIR functionality.  This allows us to develop once and deploy in three versions.

It really has been a thrill to open up the official mobile stores and see our app there, ready for free download.  Please have a look, tell others and perhaps even provide a review.  If your students do something interesting, we would be happy to hear about it and, with their permission, even post their work to our wiki.