, , ,

 Come installare e usare TFI

The following installation procedure is referred  to TFI for Matlab 5 and 6 (Releases 11, 12 and 13). For Matlab 7 (Releases from 14 to 2009a). The version for Matlab 4 requires a different setting of the  matlabpath (refer to the file readme.txt contained in the upgrade file "tfi-4-17.zip").


HOW TO INSTALL THE ITALIAN VERSION

1 – Copy the directory \intpi to \matlabroot\toolbox. To know \matlabroot simply enter "matlabroot" from the Command Window.

2 – Use "Path Browser" at the top of the Command Window or "Set Path" under the popmenu "File" to add the directory \matlabroot\toolbox\intpi to the matlabpath. Check if this process was successfull by typing "path" in the Command Window.


HOW TO INSTALL THE ENGLISH VERSION

1 – Copy the directory \intp to \matlabroot\toolbox. To know \matlabroot simply enter "matlabroot" from the Command Window.

2 – Use "Path Browser" at the top of the Command Window or "Set Path" under the popmenu "File" to add the directory \matlabroot\toolbox\intp to the matlabpath. Check if this process was successfull by typing "path" in the Command Window.


HOW TO INSTALL BOTH THE ITALIAN AND THE ENGLISH VERSION AND SWITCH TO EACH OTHER

If you want to use both the Italian and the English versions and switch to each other, you must copy the files italiano.m and english.m available in directory \switching of the zip file to the directory \matlabroot\toolbox\local (already present in all the Matlab installations). Switching is achieved by typing "english" or "italiano" in the Command Window, before TFI is entered.


HOW TO RUN

From the Command Window type "tfi" and press return; when a figure covers the Command Window, you can pass to the Command Window again by pressing the return key. To exit to Matlab from TFI, type "exit" or "quit". You can use "new" to create a new figure, "fig1", "fig2",… to select a particular figure, "ordf" to arrange all figures like a card deck, "sma[ll]”, “med[ium]” and “lar[ge]" to change the size of the current figure. Of course, you can also use the mouse to manage figures according to the Windows rules and the "Esc" key to pass from any figure to the Command Window.

NOTE: It is necessary to use a character with uniform letterspacing, like Fixedsys or Courier New in the Command Window to obtain a clear display of transfer functions.

NOTE: It is possible to quit most applications by entering "0" from any menu.


HOW TO CHANGE SOME TFI SETTINGS

Command "startint" from TFI can be used:

   1 – to define the work directory of TFI

   2 – to reduce the matlabpath in TFI environment if necessary

   3 – to set as black or white the figure background

   4 – to activate or disactivate legend in figures

    1 – The work directory of TFI is the directory where all transfer function files are saved. In the first run of TFI it is by default assumed to be the same as the Matlab directory, but it can easily be changed; of course, the new directory must exist (if not, a message is displayed and the work directory is not changed). For instance, it is possible to use \matlabroot\work for Matlab (it can be specified as a property of the Matlab icon in Windows or in the above file startup.m) and \matlabroot\workint for TFI. The Matlab work directory is restored when TFI is quitted.

    2 – At present it is not necessary to reduce the matlabpath when entering the TFI environment. This option must be used if some future toolboxes contain some files with names equal to those of \intpi or \intp directory. In this case path reduction and location of \intpi or \intp after other directories in the matlabpath eliminate conflict. The names of the toolboxes strictly necessary in the TFI environment, specified in the file "startint.m", are the standard ones of Matlab 5 or Matlab 7 (without any toolbox) plus \intpi or \intp.

    3 – The background color of the figures can be set to black (less radiation and very clean colors in color prints) or to white (more similar to other Window applications and more in vogue today).

    4 – The utility "legend" available in Matlab 5-6-7 specifies, in the figures, the corresponding transfer functions names in a small window that can be moved with the mouse to the most convenient location. Unfortunately the current version of legend is quite time-consuming, so that its use is left as an option that can be switched on/off with "startint".

The above settings are permanently saved in the file "set_tfi5.mat" or "set_tfi7.mat", located in the work directories of Matlab and TFI (it is repeated in both).


HOW TO PRINT FIGURES

Use the Matlab "print" command from the Command Window of TFI (type "help print" from TFI or Matlab to see all options). For instance, "print xx.ps -dps" generates the PostScript file "xx.ps" that reports the current figure, while "print xx.ps -dps -append" appends the figure to others in the same file. Let us recall that the option -dpsc instead of -dps enables color printing, and -deps, -depsc produce Encapsulated PostScript, that can be used to insert figures in Microsoft Word documents. By using Microsoft Word you can also select the most convenient size for the figure (both x and y dimensions can be independently changed).

OR

Use the Windows printing facility from the graphic window. To pass from  the Command Window to the current graphic window, type "shg" (from TFI) or select the figure with the mouse in the application   window.

 

Some questions and answers

Q: When "TFI has some problems with your last request" appears in the Command Window, what have I to do?
A: You can obtain some more information on the cause of  these problems by exiting to Matlab and calling the same function with the Matlab syntax [for instance, “regnich(‘gi’,’gj’)” instead of “regnich,gi,gj”] from the TFI work directory. These problems usually arise from conflict of application names in the matlabpath, and are overcome with the matlabpath reduction facility provided in startint .
Q: Is it possible to use both the English and the Italian versions from the same Matlab Command Window?
A: Yes. Before launching TFI from the  Matlab Command Window, you can use the commands italiano or english, corresponding to the files italiano.m or  english.m to be located in a directory of the matlabpath, different from intp and intpi, for instance in the directory …local, available in all the Matlab versions considered below.