'newt.m' is a matlab macro file to plot velocity vs distance.

To run it, type

matlab

In a view moment you will be in matlab environment which is indicated by '>>' prompt. Then run the macro

newt

You need an output file from 'viflow7' to run the macro, in this example it is called 'outpar1'.

You can modify this macro using a texteditor when you logon to SUN/HP unix computer. Some of the modifications you can make are:

- change the word 'outpar1' with the name of your output file from viflow7.

- change the parameters to be plotted. By now, you probably should know that the output from viflow has numbers arranged in three columns which correspond to time, velocity, and distance. Say, you want to plot velocity vs time, the changes are as follows:

x=outpar1(:,1);

y=outpar1(:,2);

here, time is assigned as x values, and velocity is assigned as y values

- Change the label (x and y) and the title. Simply change the appropiate names within the quote on commands xlabel, ylabel, and title.

- Advanced changes: you can combine different curves on one plot. For example, files outpar1 and outpar2 want to be out in one plot. Add the following lines to the macro file.

hold on

load outpar2;

x=outpar2(:,3);

y=outpar2(:,2);

h=plot(x,y);

xlabel 'Distance (m)';

ylabel 'Velocity (m/s)';

title 'Newtonian Model for n=0.075';

Note that they are basically similar to commands inside the macro file with the exception 'clear all' change to 'hold on'.

Those commands can be repeated to add additional curves.