t=1;
/*compute scaling factor here */

blforT1 = 0;

ChoiceList  (mbf,"Model Type?",1,NO_SKIP,"Muse95","Muse 95 model",
														  "RNA16","Any particular case of RNA REV");


if (mbf)
{
	copyOfModelMatrix = RNA16;
	for (h=0; h<16; h=h+1)
	{
		for (v=0; v<16; v=v+1)
		{
			if (h!=v)
			{	
				blforT1 = blforT1 + copyOfModelMatrix[h][v]*vectorOfFrequencies[v];
			}
		}
	}
}
else
{
	copyOfModelMatrix = M95;
	for (h=0; h<16; h=h+1)
	{
		for (v=0; v<16; v=v+1)
		{
			if (h!=v)
			{	
				blforT1 = blforT1 + copyOfModelMatrix[h][v];
			}
		}
	}
}

t = 1/blforT1;
if (mbf)
{
	copyOfModelMatrix = RNA16;
}
else
{
	copyOfModelMatrix = M95;
}
for (h=0; h<16; h=h+1)
{
	copyOfModelMatrix[h][h] = 0;
	for (v=0; v<16; v=v+1)
	{
		if (h!=v)
		{	
			copyOfModelMatrix[h][v] = copyOfModelMatrix[h][v] * vectorOfFrequencies[v];
			copyOfModelMatrix[h][h] = copyOfModelMatrix[h][h] - copyOfModelMatrix[h][v];
		}
	}
}



SetDialogPrompt ("Save rate and transition matrices to:");
fprintf (PROMPT_FOR_FILE,CLEAR_FILE,copyOfModelMatrix,"\n",Exp (copyOfModelMatrix));
