"Fossies" - the Fresh Open Source Software Archive 
Member "pfstools-2.2.0/README.matlab" (12 Aug 2021, 4541 Bytes) of package /linux/privat/pfstools-2.2.0.tgz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Matlab source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "README.matlab":
2.1.0_vs_2.2.0.
1
2 Matlab interface to pfstools can be found in src/matlab. It contains
3 both .m and mex functions, which need to be compiled before can be
4 used. Once pfstools is properly installed, you can browse help:
5
6 doc pfstools_matlab
7 or
8 cd <dir_with_m_and_mex_files>
9 doc ./Contents.m
10
11 If you have problems running some functions, you can execute (from matlab):
12
13 pfs_test_shell
14
15 to diagnose for common problems.
16
17 Follow the instructions below to install matlab interface to pfstools.
18
19 Linux, OSX and cygwin
20 =====================
21 cmake will search for matlab's mex scripts in typical locations. If it cannot be found, you need to pass the matlab directory to cmake:
22 cmake -DMATLAB_ROOT=<path> ../
23
24 Matlab's MEX compiler commonly uses different version of gcc than is installed on the system. If this is the case, you may see messages, such as:
25
26 Warning: You are using gcc version '5.4.0'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release.
27
28 Sometimes those warning can be ignored, other times mex commands will fail with "Invalid MEX-file". In the latter case, you need to install the correct version of the compiler:
29
30 sudo apt-get install g++-4.7
31
32 and then specify it when invoking cmake, for example:
33
34 cmake -DMEXGCC=/usr/bin/gcc-4.7 ../
35
36 After successfully compiling the code, add the directory /usr/local/share/pfstools/pfstools_matlab to matlab path
37 (File->Set Path).
38
39 For a quick test, type in Matlab command window:
40
41 pfsview( rand(100) )
42
43 so view a matrix of random numbers.
44
45
46 Windows installation
47 ====================
48
49 Note that matlab support on Windows has not been tested in 2.0.0. The notes below refer to 1.9.x version.
50
51 Under Windows you have to invoke NMAKE file manually. From ordinary DOS
52 shell (not cygwin), cd to src/matlab, then execute:
53
54 (path to your matlab instalation)/matlab/R2006b/bin/mex.bat -setup
55
56 mex.bat will ask to choose a configuration. Choose the one compatible
57 with your Visual Studio installation.
58
59 then execute:
60
61 NMAKE -f Makefile.win32
62
63 We tested compilation on Win32 with VS C++ compiler. cygwin and
64 pfstools must be installed. Then include this directory in matlab's
65 path (File/SetPath in maltab IDE menu). You may need to modify
66 pfs_shell() function that should return the command line for executing
67 'bash' from DOS shell.
68
69 Many matlab pfs_* functions need to execute shell functions, for
70 example pfsin. To make sure that they can be executed from matlab, all
71 environmental variables must be set. Currently this is done by the
72 pfs_shell function, which extends command line so that pfs* commands
73 are executed from bash (assuming that bash sets all necessary
74 environmental variables in .bashrc). If bash is not your default
75 shell, you may need to change this.
76
77
78 If no good-luck, then below is a loosely written trouble shooting:
79
80 1. From matlab, execute 'pfs_test_shell'. The function will perform a few tests
81 for the most common pfstools/matlab setup problems and will suggest the most likely
82 solution.
83
84 2. You can select a compiler for mex files using "mex -setup"
85
86 If you have more than one compiler, for instance you owe a Visual
87 Studio, then try various compilers. Sometimes things work with VC 8.0,
88 but not with VC 6.0, and sometimes the other way around.
89
90 3. If you want to compile with Visual Studio, use the "Visual Studio
91 200X Command Prompt" DOS shell.
92
93 Especially if "nmake" doesn't seem to be on your system.
94
95 4. All supplied Mex files do not depend on any library. So if you have
96 a problem within Matlab which looks like "The specified module could
97 not be found." it's not related to shared libraries. But it maybe
98 related to incompatible Visual Studio libraries, see point 1.
99
100 5. If you got everything running and type "pfsview(my_image)" and nothing shows up:
101
102 Check if X-Win32 or other X server is running, type "pfs_shell" in
103 Matlab and check if path is correct (and possibly adjust the path in
104 pfs_shell.m). Add a line to $HOME/.bash_login containing
105
106 "export DISPLAY=127.0.0.1:0"
107
108 6. Under Windows, if your Cygwin installation is not in c:\cygwin set Windows global variable:
109
110 CYGWIN_HOME='c:\MyDirectory\cygwin'
111
112 Of course, c:\MyDirectory should be replaced with a right path.
113
114
115 Known problems:
116
117 * Under Windows shell window flashes each time pfsput / pfsget command
118 is executed
119
120 * pfs channel tags are not written to pfs-streams. No channel
121 specific tags are written properly.
122
123 * Some file handles may not be closed properly.