Source code

You can download the source code from my GIT REPOSITORY


To run the code, you need to have MATLAB. The GUI file is RefCrV1t.m.

The general design of the software is as follow:

  • when the user press Find, the string value is taken from the text box on the left
  • The UnderlyingCit function will go through the string, find the citations and make them bold (using HTML formatting) and paste the result on the upper-right text box.
  • The string is the passed to readText,which will find the citations and organize them in an author list. The author list is a cellarray with two columns and as many rows as the number of unique citation found. The first column is for the author(s), the second one the year.
  • The author list is passed the createReference, which will pass every couple “authors – year” to findPaper. FindPaper will look for the pair authors-year on the Mendeley database, it will take the first two results with a different DOI and it will organize the meta-data in a structure.
  • CreateReference will do some check on the papers, looking at the concordance between author’s number, author’s name and year. It will return an array of struct, any struct containing only the APA reference of the best result, a flag (perfect match, warning, multiple matches) and the doi.
  • This array is given back to readText, which will check for duplicates using the doi. It will also create the reference list in HTML style, pass everything back to the GUI which will print the result on the bottom window.

The code in here is completely mine, as inefficient as it looks. However, I have to thank Yair Altman for the suggestion about how to use HTML for uicomponent, and for its script fjobj, to find java object.