|
|
Matlab can be accessed on any computer with internet by going to
http://www.loyola.edu/moresoftware/
and logging into Citrix using your Groupwise username and password. From there click "Math Apps" and then "MatLab 7".
The first thing to do once Matlab is loaded is to change your Current Directory to your G: drive, which is simple to do. Just click the button with the ellipsis . . . on it and scroll up to the G: drive. Therefore, everything will be saved to your G drive. So, now you can start experimenting!
To start plotting in Matlab you need two things: x values and y values. To create a list of numbers for your domain, it may be beneficial to use the command linspace. For example,
>>x = linspace(-50,50,200);
will create 200 equally spaced points between -50 and 50, and will store the values in the variable x. Then you can create y values that are based on these x-values. If you are using the commands * / ^, remember to put a . before the operations so that the command will be given component-wise. For example, if you wanted to square each element of x, you would use the command
>>y = x.^2;
Now that you have a list of x and y values you can plot the graph with the command
>>plot(x,y);
For different methods for plotting such as colors and marker style, type
>>help plot
and a list will be given showing the different options. For example, to have a plot of red circles, you would type
>>plot(x,y,'ro');
To add graphs to the figure use the command hold on, while the command hold off will release the graph. That is it! You should now have all the tools necessary to plot your first graph. Experiment and make some pretty pictures!
|
|