Using MATLAB to Study Plant Health and Herbivory for Small-scale Research Experiments

Catherine Buell, Fitchburg State University, Mathematics
Author Profile


This lab manual supports undergraduate students and researchers in using non-destructive, cost-effective techniques to measure a variety of plant phenotypes including resistance to insect herbivory, pigmentation, and growth. MATLAB is utilized and data is exported to Excel for processing. Students have the opportunity to use the programs and the tool to modify their experiments for a variety of plant related matters.

All authors (CB, Emma Downs and Erin MacNeal Rehrig from Fitchburg State University, Department of Biology and Chemistry) contributed equally to this project. Along with students, ED synthesized and characterized nanoparticles, EMR conducted the plant experiments, and CB designed and ran the digital image analysis scripts. This project was funded in part by a Fitchburg State University Special Projects Grant.

Learning Goals

Students will learn the advantage of using MATLAB to perform these computations with plants (doesn't damage the plant, preserves data for reproduction, and the ability to vary the data collected).

Context for Use

This is a lab activity for college students studying Plant Biology. It has been used at a small, public university in a lab with 16 students. Students are instructed in MATLAB and have no prior knowledge of mathematics, but are actively involved in the Plant Biology lab. The manual was presented in a lab (1-2 hours); however, it is associated with a semester long project.

Description and Teaching Materials

There is a need for an inexpensive, accessible, and non-destructive tool for small-scale plant phenotyping. Some computational tools that have been made available for plant phenomics include LemnaTec [4], ImageJ [1], and Phenophyte [2]. However, there are drawbacks to using some of these programs and other computational systems. Many are focused on high-throughput plant phenotyping, are no longer being supported, or are cost-prohibitive to academic researchers, graduate students, and undergraduates. Other programs, including ImageJ (an open-source NIH image analysis package), require a significant amount of user knowledge in programming and data analysis. The goal of this project was to use an existing, robust, and readily available program that can perform computational analysis of plant digital images non-destructively and in situ.

MATLAB has both the computational tools and a user-friendly interface to fill this need. Most campuses (over 5,000 universities and colleges worldwide) have either institutional memberships or a computer lab with access to MATLAB. The Image Processing software is flexible enough to measure a multitude of plant attributes including pigmentation changes (chlorosis), growth, and tissue damage due to herbivory. High-resolution photographs can be produced in the lab or in the field using a smart phone. The ability to import images and masks, as well as seamlessly export data to a spreadsheet, allows more researchers and students to participate in smaller research projects with limited tools and resources.

Below, we provide a brief outline of an experiment using MATLAB, a sample lab manual and scripts are attached in Support Materials. While the audience is an undergraduate Plant Biology class, the methods are applicable and accessible to professors, post docs, and graduate students who are working on small-scale research projects in plant phenomics. Current efforts are in place to additionally apply this computational system to measure root growth and infection and leaf chlorosis due to insect infestation.

Silvernanoparticles and Plant Growth

In this study we treated Arabidopsis thaliana plants with silver nanoparticles (AgNPs) over a 5-week period then conducted a 48-hour herbivory assay. We used digital image analysis and customized scripts in MATLAB to analyze our data. Our results of this acvitity suggested that AgNPs are detrimental to plant growth and health, but reduce insect feeding without negative effects on insect performance [6].

Instead of physical measurement, we used high-resolution images and counted plant pixels in the image which were converted to square centimeter measurements. Using the data, we found average plant growth, caterpillar ingestion, and measured the effects of silver nanoparticles on growth and coloration. In order to semi-automatize the process and provide accurate computations from the images, we utilized both existing processing software and original code in MATLAB®.

Basic Experimental Design/Methods

-AgNPs were synthesized.

-Two-week old seedlings were treated weekly with
10 mL water, Na+Citrate/NO3, 50 ppm AgNP
or 100 ppm AgNP for 5 weeks.

-Pictures were taken with iPhone 6S+ in a photo box at three stages of the experiment.

-MATLAB and Excel are used to process the images, compute necessary measurements, and analyze the data.

In this particular experiment the goal was to study both the impact of AgNPs on plant growth and caterpillar herbivory. Students are asked to consider what they would wish to measure in their own plant experiments as they learn the computational and image analysis tools available from MATLAB.

The attached files are the .m files students used to gather data and the lab manual that guided student experiments.
Lab Manual for Plant Health and Herbivory (Acrobat (PDF) 30.4MB Nov6 19)
green.m file (Matlab File 499bytes Nov6 19)
prep.m file (Matlab File 142bytes Nov6 19)
mixed.m file (Matlab File 1kB Nov6 19)

Teaching Notes and Tips

Walking through the lab with students requires time and patience. The lab requires the Image Processing Toolbox. If a TA or student assist is available, then it is helpful to have them walk around the class.


Students complete their own experiment with their lab group. Students are assessed on the presentation of their final data and experimental design along with their use of MATLAB.

References and Resources

1. Abramoff MD, Magelhaes PJ, Ram SJ: Image Processing with ImageJ. Biophotonics International, volume 11, p.36-42, 2004.

2. Green, J., Appel, H., Rehrig, E.M., Harnsomburana, J., Chang, J., Balint-Kurti, P., and Shyu, C. PhenoPhyte: a flexible affordable method to quantify 2D phenotypes from imagery. Plant Methods, volume 8, Article number: 45, 2012.

3. Hartmann, A., Czaurderna, T., Hoffmann, R., Stein, N., and Schreiber, F. HTPheno: An image analysis pipeline for high-throughput plant phenotyping. BMC Bioinformatics, volume 12, Article number: 148, 2011.

4. LemnaTec,

5. Rehrig, E.M, Downs, E., and Buell, C. Assessing the Effect of High-Quality Synthesized Silver Nanoparticles (AgNPs) on Plant Health and Insect Herbivory Using Mathematical Image Analysis Software, poster presentation given at the American Society for Plant Biology annual conference, Aug. 3-7, 2019, San Jose, CA.