MATLAB/Wikiquiz writer (MATLAB)/main.m

clear;clc;
% Creates three wiki pages from a conceptual quiz (w/o letters)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% USER  ENTERS ouputfilename/test header HERE: 
headertext='pe06Derive'; %headertext is BOTH test header and matlab filename 
categorytext ='';%'[[Category:How things work/Quizzes]] ';
permalinktext = '';%not needed if extra lines is zero
%%%% USER  ENTERS EXTRA LINES HERE * 
extralines = 0;%Insert 0, 1, or 2 lines into wikiquiz page.
textline1=['This Quiz is based on ' permalinktext ];
textline2=['<br><big>[[/Testbank/|Click for link to TESTBANK]]</big><br><big>[[../How to use testbank|How to use these quizzes]]<br>' categorytext];
%%%% DEFAULT/backup:
% extralines = 0; textline1=' '; textline2=' ';
%%%%%  Do not modify anything below this line: %%%%%
wikifile='InputQuizFile.txt';
quizarray =wikiquizToStringArray(wikifile);
%this call fails
firstpagedone = writefirstpage(quizarray,headertext,extralines, textline1,textline2); 
%secondpagedone = writetwoversion(quizarray,headertext); currently not needed
quizarray =wikiquizToStringArray(wikifile);
quizarray=removeheaders(quizarray);
extralines = 1;%Insert 0, 1, or 2 lines into wikiquiz page.
textline1=permalinktext;
textline2='';
manypagesdone = write25versions(quizarray,headertext,extralines, textline1,textline2);