1 | <?xml version='1.0' encoding='UTF-8' standalone='no'?> |
---|
2 | <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6"> |
---|
3 | <compounddef id="itsave_8m" kind="file"> |
---|
4 | <compoundname>itsave.m</compoundname> |
---|
5 | <sectiondef kind="var"> |
---|
6 | <memberdef kind="variable" id="itsave_8m_1680e0ce70cda1a60557184bef5a6168e" prot="public" static="no" mutable="no"> |
---|
7 | <type>File</type> |
---|
8 | <definition>File __pad1__</definition> |
---|
9 | <argsstring></argsstring> |
---|
10 | <name>__pad1__</name> |
---|
11 | <briefdescription> |
---|
12 | </briefdescription> |
---|
13 | <detaileddescription> |
---|
14 | </detaileddescription> |
---|
15 | <inbodydescription> |
---|
16 | </inbodydescription> |
---|
17 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="5" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="5" bodyend="-1"/> |
---|
18 | </memberdef> |
---|
19 | <memberdef kind="variable" id="itsave_8m_14a7fd756291457a2f23abdb704288459" prot="public" static="no" mutable="no"> |
---|
20 | <type>File</type> |
---|
21 | <definition>File var1</definition> |
---|
22 | <argsstring></argsstring> |
---|
23 | <name>var1</name> |
---|
24 | <briefdescription> |
---|
25 | </briefdescription> |
---|
26 | <detaileddescription> |
---|
27 | </detaileddescription> |
---|
28 | <inbodydescription> |
---|
29 | </inbodydescription> |
---|
30 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="5" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="5" bodyend="-1"/> |
---|
31 | </memberdef> |
---|
32 | <memberdef kind="variable" id="itsave_8m_1f2e4dfefec07c708c5ac8574c56da537" prot="public" static="no" mutable="no"> |
---|
33 | <type>you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software</type> |
---|
34 | <definition>if write to the Free Software Foundation</definition> |
---|
35 | <argsstring></argsstring> |
---|
36 | <name>Foundation</name> |
---|
37 | <briefdescription> |
---|
38 | </briefdescription> |
---|
39 | <detaileddescription> |
---|
40 | </detaileddescription> |
---|
41 | <inbodydescription> |
---|
42 | </inbodydescription> |
---|
43 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="21" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="21" bodyend="-1"/> |
---|
44 | </memberdef> |
---|
45 | <memberdef kind="variable" id="itsave_8m_1355539e51bed3008068dfe985e226ab8" prot="public" static="no" mutable="no"> |
---|
46 | <type>either version of the</type> |
---|
47 | <definition>either version of the License</definition> |
---|
48 | <argsstring></argsstring> |
---|
49 | <name>License</name> |
---|
50 | <briefdescription> |
---|
51 | </briefdescription> |
---|
52 | <detaileddescription> |
---|
53 | </detaileddescription> |
---|
54 | <inbodydescription> |
---|
55 | </inbodydescription> |
---|
56 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="21" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="21" bodyend="-1"/> |
---|
57 | </memberdef> |
---|
58 | <memberdef kind="variable" id="itsave_8m_101d4ec73d916d67d085f3e63d1fdbd4b" prot="public" static="no" mutable="no"> |
---|
59 | <type>either version of the but WITHOUT ANY</type> |
---|
60 | <definition>either version of the but WITHOUT ANY WARRANTY</definition> |
---|
61 | <argsstring></argsstring> |
---|
62 | <name>WARRANTY</name> |
---|
63 | <briefdescription> |
---|
64 | </briefdescription> |
---|
65 | <detaileddescription> |
---|
66 | </detaileddescription> |
---|
67 | <inbodydescription> |
---|
68 | </inbodydescription> |
---|
69 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="25" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="25" bodyend="-1"/> |
---|
70 | </memberdef> |
---|
71 | <memberdef kind="variable" id="itsave_8m_1d1fcf7d480c2fceaa3fc2635af62b648" prot="public" static="no" mutable="no"> |
---|
72 | <type>without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of the GNU General Public License along with this</type> |
---|
73 | <definition>without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of the GNU General Public License along with this program</definition> |
---|
74 | <argsstring></argsstring> |
---|
75 | <name>program</name> |
---|
76 | <briefdescription> |
---|
77 | </briefdescription> |
---|
78 | <detaileddescription> |
---|
79 | </detaileddescription> |
---|
80 | <inbodydescription> |
---|
81 | </inbodydescription> |
---|
82 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="30" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="30" bodyend="-1"/> |
---|
83 | </memberdef> |
---|
84 | <memberdef kind="variable" id="itsave_8m_1e6cf43db481de26465fb7c527d5d985f" prot="public" static="no" mutable="no"> |
---|
85 | <type>if</type> |
---|
86 | <definition>if not</definition> |
---|
87 | <argsstring></argsstring> |
---|
88 | <name>not</name> |
---|
89 | <briefdescription> |
---|
90 | </briefdescription> |
---|
91 | <detaileddescription> |
---|
92 | </detaileddescription> |
---|
93 | <inbodydescription> |
---|
94 | </inbodydescription> |
---|
95 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="30" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="30" bodyend="-1"/> |
---|
96 | </memberdef> |
---|
97 | <memberdef kind="variable" id="itsave_8m_1905b4a7c11572b0a44b1a053ce673c5d" prot="public" static="no" mutable="no"> |
---|
98 | <type>if write to the Free Software</type> |
---|
99 | <definition>if write to the Free Software Inc</definition> |
---|
100 | <argsstring></argsstring> |
---|
101 | <name>Inc</name> |
---|
102 | <briefdescription> |
---|
103 | </briefdescription> |
---|
104 | <detaileddescription> |
---|
105 | </detaileddescription> |
---|
106 | <inbodydescription> |
---|
107 | </inbodydescription> |
---|
108 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="31" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="30" bodyend="-1"/> |
---|
109 | </memberdef> |
---|
110 | <memberdef kind="variable" id="itsave_8m_1fe1a6e4154d81acb571f8aab6721aea4" prot="public" static="no" mutable="no"> |
---|
111 | <type>if write to the Free Software Franklin</type> |
---|
112 | <definition>if write to the Free Software Franklin St</definition> |
---|
113 | <argsstring></argsstring> |
---|
114 | <name>St</name> |
---|
115 | <briefdescription> |
---|
116 | </briefdescription> |
---|
117 | <detaileddescription> |
---|
118 | </detaileddescription> |
---|
119 | <inbodydescription> |
---|
120 | </inbodydescription> |
---|
121 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="31" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="30" bodyend="-1"/> |
---|
122 | </memberdef> |
---|
123 | <memberdef kind="variable" id="itsave_8m_1d2b5073b95842f7a6ed83d3aeec19bbe" prot="public" static="no" mutable="no"> |
---|
124 | <type>if write to the Free Software Franklin Fifth</type> |
---|
125 | <definition>if write to the Free Software Franklin Fifth Floor</definition> |
---|
126 | <argsstring></argsstring> |
---|
127 | <name>Floor</name> |
---|
128 | <briefdescription> |
---|
129 | </briefdescription> |
---|
130 | <detaileddescription> |
---|
131 | </detaileddescription> |
---|
132 | <inbodydescription> |
---|
133 | </inbodydescription> |
---|
134 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="31" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="30" bodyend="-1"/> |
---|
135 | </memberdef> |
---|
136 | <memberdef kind="variable" id="itsave_8m_18325b5643fb5a8089993e30526606acc" prot="public" static="no" mutable="no"> |
---|
137 | <type>if write to the Free Software Franklin Fifth</type> |
---|
138 | <definition>if write to the Free Software Franklin Fifth Boston</definition> |
---|
139 | <argsstring></argsstring> |
---|
140 | <name>Boston</name> |
---|
141 | <briefdescription> |
---|
142 | </briefdescription> |
---|
143 | <detaileddescription> |
---|
144 | </detaileddescription> |
---|
145 | <inbodydescription> |
---|
146 | </inbodydescription> |
---|
147 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="31" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="30" bodyend="-1"/> |
---|
148 | </memberdef> |
---|
149 | <memberdef kind="variable" id="itsave_8m_1545f2213e9a5115b1b8530c3f8cf85d9" prot="public" static="no" mutable="no"> |
---|
150 | <type>end</type> |
---|
151 | <definition>end nargs</definition> |
---|
152 | <argsstring></argsstring> |
---|
153 | <name>nargs</name> |
---|
154 | <initializer> size(vars,2)</initializer> |
---|
155 | <briefdescription> |
---|
156 | </briefdescription> |
---|
157 | <detaileddescription> |
---|
158 | </detaileddescription> |
---|
159 | <inbodydescription> |
---|
160 | </inbodydescription> |
---|
161 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="44" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="44" bodyend="-1"/> |
---|
162 | </memberdef> |
---|
163 | <memberdef kind="variable" id="itsave_8m_183583892f1d8254cfda94a12cd780c0d" prot="public" static="no" mutable="no"> |
---|
164 | <type>for</type> |
---|
165 | <definition>for ai</definition> |
---|
166 | <argsstring></argsstring> |
---|
167 | <name>ai</name> |
---|
168 | <initializer>1:nargs |
---|
169 | if (exist('OCTAVE_VERSION')) % check for octave |
---|
170 | vname = deblank(argn(ai+1,:))</initializer> |
---|
171 | <briefdescription> |
---|
172 | </briefdescription> |
---|
173 | <detaileddescription> |
---|
174 | </detaileddescription> |
---|
175 | <inbodydescription> |
---|
176 | </inbodydescription> |
---|
177 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="60" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="58" bodyend="-1"/> |
---|
178 | </memberdef> |
---|
179 | <memberdef kind="variable" id="itsave_8m_1e9a9383c1afbb6bbb2051c542d82156b" prot="public" static="no" mutable="no"> |
---|
180 | <type>octave way of getting parameter name</type> |
---|
181 | <definition>matlab way of getting parameter name is_octave</definition> |
---|
182 | <argsstring></argsstring> |
---|
183 | <name>is_octave</name> |
---|
184 | <initializer>1</initializer> |
---|
185 | <briefdescription> |
---|
186 | </briefdescription> |
---|
187 | <detaileddescription> |
---|
188 | </detaileddescription> |
---|
189 | <inbodydescription> |
---|
190 | </inbodydescription> |
---|
191 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="61" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="61" bodyend="-1"/> |
---|
192 | </memberdef> |
---|
193 | <memberdef kind="variable" id="itsave_8m_14e1a421d8af350ce1f106adb3aecae87" prot="public" static="no" mutable="no"> |
---|
194 | <type>used by function itsizeof to identify octave else</type> |
---|
195 | <definition>used by function itsizeof to identify octave else vname</definition> |
---|
196 | <argsstring></argsstring> |
---|
197 | <name>vname</name> |
---|
198 | <initializer> inputname(ai+1)</initializer> |
---|
199 | <briefdescription> |
---|
200 | </briefdescription> |
---|
201 | <detaileddescription> |
---|
202 | </detaileddescription> |
---|
203 | <inbodydescription> |
---|
204 | </inbodydescription> |
---|
205 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="63" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="63" bodyend="-1"/> |
---|
206 | </memberdef> |
---|
207 | <memberdef kind="variable" id="itsave_8m_1bdc0dbb7c91d13ef90e78dc0c1b8b693" prot="public" static="no" mutable="no"> |
---|
208 | <type>used by function itsizeof to identify matlab end</type> |
---|
209 | <definition>used by function itsizeof to identify matlab end v</definition> |
---|
210 | <argsstring></argsstring> |
---|
211 | <name>v</name> |
---|
212 | <initializer> vars{ai}</initializer> |
---|
213 | <briefdescription> |
---|
214 | </briefdescription> |
---|
215 | <detaileddescription> |
---|
216 | </detaileddescription> |
---|
217 | <inbodydescription> |
---|
218 | </inbodydescription> |
---|
219 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="66" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="66" bodyend="-1"/> |
---|
220 | </memberdef> |
---|
221 | <memberdef kind="variable" id="itsave_8m_12179a3890d2c6800564e009e1b729ad2" prot="public" static="no" mutable="no"> |
---|
222 | <type></type> |
---|
223 | <definition>is_scalar</definition> |
---|
224 | <argsstring></argsstring> |
---|
225 | <name>is_scalar</name> |
---|
226 | <initializer> all(size(v) == 1)</initializer> |
---|
227 | <briefdescription> |
---|
228 | </briefdescription> |
---|
229 | <detaileddescription> |
---|
230 | </detaileddescription> |
---|
231 | <inbodydescription> |
---|
232 | </inbodydescription> |
---|
233 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="68" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="68" bodyend="-1"/> |
---|
234 | </memberdef> |
---|
235 | <memberdef kind="variable" id="itsave_8m_1da70dbb0a8dd4ae0dfdf22e7a1c59fc5" prot="public" static="no" mutable="no"> |
---|
236 | <type></type> |
---|
237 | <definition>data_bytes</definition> |
---|
238 | <argsstring></argsstring> |
---|
239 | <name>data_bytes</name> |
---|
240 | <initializer> itsizeof(uint64(0),is_octave) + itsizeof(char(0),is_octave) * prod(size(v))</initializer> |
---|
241 | <briefdescription> |
---|
242 | </briefdescription> |
---|
243 | <detaileddescription> |
---|
244 | </detaileddescription> |
---|
245 | <inbodydescription> |
---|
246 | </inbodydescription> |
---|
247 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="78" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="78" bodyend="-1"/> |
---|
248 | </memberdef> |
---|
249 | <memberdef kind="variable" id="itsave_8m_1a881823d403873173d08f8a4f602eab3" prot="public" static="no" mutable="no"> |
---|
250 | <type>else a matrix</type> |
---|
251 | <definition>else a matrix hdr_bytes</definition> |
---|
252 | <argsstring></argsstring> |
---|
253 | <name>hdr_bytes</name> |
---|
254 | <initializer> 3 * itsizeof(uint64(0),is_octave) + size(vname,2)+1 ... |
---|
255 | + itsizeof('bmat',is_octave)+1 +1</initializer> |
---|
256 | <briefdescription> |
---|
257 | </briefdescription> |
---|
258 | <detaileddescription> |
---|
259 | </detaileddescription> |
---|
260 | <inbodydescription> |
---|
261 | </inbodydescription> |
---|
262 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="81" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="80" bodyend="-1"/> |
---|
263 | </memberdef> |
---|
264 | <memberdef kind="variable" id="itsave_8m_18d5491d4519ca139c65068a3215c2f8e" prot="public" static="no" mutable="no"> |
---|
265 | <type>end</type> |
---|
266 | <definition>end block_bytes</definition> |
---|
267 | <argsstring></argsstring> |
---|
268 | <name>block_bytes</name> |
---|
269 | <initializer> hdr_bytes + data_bytes</initializer> |
---|
270 | <briefdescription> |
---|
271 | </briefdescription> |
---|
272 | <detaileddescription> |
---|
273 | </detaileddescription> |
---|
274 | <inbodydescription> |
---|
275 | </inbodydescription> |
---|
276 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="84" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="84" bodyend="-1"/> |
---|
277 | </memberdef> |
---|
278 | <memberdef kind="variable" id="itsave_8m_12cc9ac9e94cfef4cc424d9133995a71c" prot="public" static="no" mutable="no"> |
---|
279 | <type>Write data type</type> |
---|
280 | <definition>end else a matrix Write data type string</definition> |
---|
281 | <argsstring></argsstring> |
---|
282 | <name>string</name> |
---|
283 | <briefdescription> |
---|
284 | </briefdescription> |
---|
285 | <detaileddescription> |
---|
286 | </detaileddescription> |
---|
287 | <inbodydescription> |
---|
288 | </inbodydescription> |
---|
289 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="91" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="91" bodyend="-1"/> |
---|
290 | </memberdef> |
---|
291 | <memberdef kind="variable" id="itsave_8m_1227cfb8ad17fc637bb6a27a88f08b4bf" prot="public" static="no" mutable="no"> |
---|
292 | <type>Write data type empty description string and data size</type> |
---|
293 | <definition>Write data type empty description string and data size bvec</definition> |
---|
294 | <argsstring></argsstring> |
---|
295 | <name>bvec</name> |
---|
296 | <briefdescription> |
---|
297 | </briefdescription> |
---|
298 | <detaileddescription> |
---|
299 | </detaileddescription> |
---|
300 | <inbodydescription> |
---|
301 | </inbodydescription> |
---|
302 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="93" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="93" bodyend="-1"/> |
---|
303 | </memberdef> |
---|
304 | <memberdef kind="variable" id="itsave_8m_105283d6bf805b4664deeec1d79f376d4" prot="public" static="no" mutable="no"> |
---|
305 | <type>Write data type empty description string and data size</type> |
---|
306 | <definition>Write data type empty description string and data size ivec</definition> |
---|
307 | <argsstring></argsstring> |
---|
308 | <name>ivec</name> |
---|
309 | <briefdescription> |
---|
310 | </briefdescription> |
---|
311 | <detaileddescription> |
---|
312 | </detaileddescription> |
---|
313 | <inbodydescription> |
---|
314 | </inbodydescription> |
---|
315 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="122" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="122" bodyend="-1"/> |
---|
316 | </memberdef> |
---|
317 | <memberdef kind="variable" id="itsave_8m_166615ffdd5b08a31b7f5b92df6d3bcdd" prot="public" static="no" mutable="no"> |
---|
318 | <type></type> |
---|
319 | <definition>dvec</definition> |
---|
320 | <argsstring></argsstring> |
---|
321 | <name>dvec</name> |
---|
322 | <briefdescription> |
---|
323 | </briefdescription> |
---|
324 | <detaileddescription> |
---|
325 | </detaileddescription> |
---|
326 | <inbodydescription> |
---|
327 | </inbodydescription> |
---|
328 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="153" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="153" bodyend="-1"/> |
---|
329 | </memberdef> |
---|
330 | <memberdef kind="variable" id="itsave_8m_19b932e10d196780312f615d3c2b408f2" prot="public" static="no" mutable="no"> |
---|
331 | <type>Write data for</type> |
---|
332 | <definition>Write data for i</definition> |
---|
333 | <argsstring></argsstring> |
---|
334 | <name>i</name> |
---|
335 | <initializer>1:size(v(:),1) |
---|
336 | fwrite(fid, real(v(i)), 'float64')</initializer> |
---|
337 | <briefdescription> |
---|
338 | </briefdescription> |
---|
339 | <detaileddescription> |
---|
340 | </detaileddescription> |
---|
341 | <inbodydescription> |
---|
342 | </inbodydescription> |
---|
343 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="187" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="186" bodyend="-1"/> |
---|
344 | </memberdef> |
---|
345 | <memberdef kind="variable" id="itsave_8m_14219087f2d987a0fb99ff3b63601b076" prot="public" static="no" mutable="no"> |
---|
346 | <type>Write data for</type> |
---|
347 | <definition>Write data for j</definition> |
---|
348 | <argsstring></argsstring> |
---|
349 | <name>j</name> |
---|
350 | <initializer>1:size(v,2) |
---|
351 | for i=1:size(v,1) |
---|
352 | fwrite(fid, real(v(i,j)), 'float64')</initializer> |
---|
353 | <briefdescription> |
---|
354 | </briefdescription> |
---|
355 | <detaileddescription> |
---|
356 | </detaileddescription> |
---|
357 | <inbodydescription> |
---|
358 | </inbodydescription> |
---|
359 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="197" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="195" bodyend="-1"/> |
---|
360 | </memberdef> |
---|
361 | <memberdef kind="variable" id="itsave_8m_1e0d1a96bdaefe1ebe985f6536223de7b" prot="public" static="no" mutable="no"> |
---|
362 | <type></type> |
---|
363 | <definition>else nbytes</definition> |
---|
364 | <argsstring></argsstring> |
---|
365 | <name>nbytes</name> |
---|
366 | <initializer>tmp.bytes</initializer> |
---|
367 | <briefdescription> |
---|
368 | </briefdescription> |
---|
369 | <detaileddescription> |
---|
370 | </detaileddescription> |
---|
371 | <inbodydescription> |
---|
372 | </inbodydescription> |
---|
373 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="217" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="217" bodyend="-1"/> |
---|
374 | </memberdef> |
---|
375 | <memberdef kind="variable" id="itsave_8m_1fb358f48b1646c750fb9da6c6585be2b" prot="public" static="no" mutable="no"> |
---|
376 | <type></type> |
---|
377 | <definition>end</definition> |
---|
378 | <argsstring></argsstring> |
---|
379 | <name>end</name> |
---|
380 | <briefdescription> |
---|
381 | </briefdescription> |
---|
382 | <detaileddescription> |
---|
383 | </detaileddescription> |
---|
384 | <inbodydescription> |
---|
385 | </inbodydescription> |
---|
386 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="223" bodyfile="/home/smidl/work/git/mixpp/matlab/itsave.m" bodystart="223" bodyend="-1"/> |
---|
387 | </memberdef> |
---|
388 | </sectiondef> |
---|
389 | <sectiondef kind="func"> |
---|
390 | <memberdef kind="function" id="itsave_8m_19578960e5d7ee914d0d6838b76a7473e" prot="public" static="yes" const="no" explicit="no" inline="no" virt="virtual"> |
---|
391 | <type>id</type> |
---|
392 | <definition>id types:</definition> |
---|
393 | <argsstring>(see AUTHORS file for a list of contributors software)</argsstring> |
---|
394 | <name>types:</name> |
---|
395 | <param> |
---|
396 | <type>see AUTHORS file for a list of contributors</type> |
---|
397 | <declname>software</declname> |
---|
398 | </param> |
---|
399 | <briefdescription> |
---|
400 | </briefdescription> |
---|
401 | <detaileddescription> |
---|
402 | </detaileddescription> |
---|
403 | <inbodydescription> |
---|
404 | </inbodydescription> |
---|
405 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="19"/> |
---|
406 | </memberdef> |
---|
407 | <memberdef kind="function" id="itsave_8m_158781a13256e170574b13bb2170e928e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
408 | <type>either version of the</type> |
---|
409 | <definition>either version of the or</definition> |
---|
410 | <argsstring>(at your option) any later version.%%This program is distributed in the hope that it will be useful</argsstring> |
---|
411 | <name>or</name> |
---|
412 | <param> |
---|
413 | <type>at your</type> |
---|
414 | <declname>option</declname> |
---|
415 | </param> |
---|
416 | <briefdescription> |
---|
417 | </briefdescription> |
---|
418 | <detaileddescription> |
---|
419 | </detaileddescription> |
---|
420 | <inbodydescription> |
---|
421 | </inbodydescription> |
---|
422 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="24"/> |
---|
423 | </memberdef> |
---|
424 | <memberdef kind="function" id="itsave_8m_14727c1a57822674adfe9ca2bba3ec03c" prot="public" static="no" const="no" explicit="no" inline="no" virt="virtual"> |
---|
425 | <type>nargin > 1</type> |
---|
426 | <definition>nargin > 1 varargin</definition> |
---|
427 | <argsstring>()</argsstring> |
---|
428 | <name>varargin</name> |
---|
429 | <briefdescription> |
---|
430 | </briefdescription> |
---|
431 | <detaileddescription> |
---|
432 | </detaileddescription> |
---|
433 | <inbodydescription> |
---|
434 | </inbodydescription> |
---|
435 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="39"/> |
---|
436 | </memberdef> |
---|
437 | <memberdef kind="function" id="itsave_8m_1c50dd0c6c3b0c631691ab989849ad18e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
438 | <type>else</type> |
---|
439 | <definition>else error</definition> |
---|
440 | <argsstring>('Usage:itsave("fname.it", var1,[var2],...)')</argsstring> |
---|
441 | <name>error</name> |
---|
442 | <param> |
---|
443 | <type>'Usage:itsave("fname.it", var1,[var2],...)'</type> |
---|
444 | </param> |
---|
445 | <briefdescription> |
---|
446 | </briefdescription> |
---|
447 | <detaileddescription> |
---|
448 | </detaileddescription> |
---|
449 | <inbodydescription> |
---|
450 | </inbodydescription> |
---|
451 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="41"/> |
---|
452 | </memberdef> |
---|
453 | <memberdef kind="function" id="itsave_8m_1ef94a0620ccad5238d95602e19b26b8d" prot="public" static="no" const="no" explicit="no" inline="no" virt="virtual"> |
---|
454 | <type>id</type> |
---|
455 | <definition>id file_version</definition> |
---|
456 | <argsstring>()</argsstring> |
---|
457 | <name>file_version</name> |
---|
458 | <briefdescription> |
---|
459 | </briefdescription> |
---|
460 | <detaileddescription> |
---|
461 | </detaileddescription> |
---|
462 | <inbodydescription> |
---|
463 | </inbodydescription> |
---|
464 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="47"/> |
---|
465 | </memberdef> |
---|
466 | <memberdef kind="function" id="itsave_8m_1a4dd54430d7ccdd48ab38f8f15ae4d87" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
467 | <type></type> |
---|
468 | <definition>if</definition> |
---|
469 | <argsstring>(fid==-1) error(err_msg)</argsstring> |
---|
470 | <name>if</name> |
---|
471 | <param> |
---|
472 | <type>fid</type> |
---|
473 | <defval>=-1</defval> |
---|
474 | </param> |
---|
475 | <briefdescription> |
---|
476 | </briefdescription> |
---|
477 | <detaileddescription> |
---|
478 | </detaileddescription> |
---|
479 | <inbodydescription> |
---|
480 | </inbodydescription> |
---|
481 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="51"/> |
---|
482 | </memberdef> |
---|
483 | <memberdef kind="function" id="itsave_8m_14e05a750514fcad920a55235ecf5b04d" prot="public" static="yes" const="no" explicit="no" inline="no" virt="virtual"> |
---|
484 | <type>fid, 'IT++%c', file_version</type> |
---|
485 | <definition>fid, 'IT++%c', file_version fprintf</definition> |
---|
486 | <argsstring>()</argsstring> |
---|
487 | <name>fprintf</name> |
---|
488 | <briefdescription> |
---|
489 | </briefdescription> |
---|
490 | <detaileddescription> |
---|
491 | </detaileddescription> |
---|
492 | <inbodydescription> |
---|
493 | </inbodydescription> |
---|
494 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="56"/> |
---|
495 | </memberdef> |
---|
496 | <memberdef kind="function" id="itsave_8m_1f43d15bf3aafca3e489119a7b034aedb" prot="public" static="no" const="no" explicit="no" inline="no" virt="pure-virtual"> |
---|
497 | <type>true if</type> |
---|
498 | <definition>true if scalar</definition> |
---|
499 | <argsstring>(for future use) is_vector=0</argsstring> |
---|
500 | <name>scalar</name> |
---|
501 | <param> |
---|
502 | <type>for future</type> |
---|
503 | <declname>use</declname> |
---|
504 | </param> |
---|
505 | <briefdescription> |
---|
506 | </briefdescription> |
---|
507 | <detaileddescription> |
---|
508 | </detaileddescription> |
---|
509 | <inbodydescription> |
---|
510 | </inbodydescription> |
---|
511 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="69"/> |
---|
512 | </memberdef> |
---|
513 | <memberdef kind="function" id="itsave_8m_1422effd4a51a50bded0e821258987507" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
514 | <type></type> |
---|
515 | <definition>sum</definition> |
---|
516 | <argsstring>(size(v) > 1)<</argsstring> |
---|
517 | <name>sum</name> |
---|
518 | <param> |
---|
519 | <type>size(v)</type> |
---|
520 | </param> |
---|
521 | <param> |
---|
522 | <type>1</type> |
---|
523 | </param> |
---|
524 | <briefdescription> |
---|
525 | </briefdescription> |
---|
526 | <detaileddescription> |
---|
527 | </detaileddescription> |
---|
528 | <inbodydescription> |
---|
529 | </inbodydescription> |
---|
530 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="69"/> |
---|
531 | </memberdef> |
---|
532 | <memberdef kind="function" id="itsave_8m_13b6bab51c028a3d444b2dd5ef8c74e53" prot="public" static="no" const="no" explicit="no" inline="no" virt="pure-virtual"> |
---|
533 | <type>true if a</type> |
---|
534 | <definition>true if a vector</definition> |
---|
535 | <argsstring>(or a scalar) is_intbin=0</argsstring> |
---|
536 | <name>vector</name> |
---|
537 | <param> |
---|
538 | <type>or a</type> |
---|
539 | <declname>scalar</declname> |
---|
540 | </param> |
---|
541 | <briefdescription> |
---|
542 | </briefdescription> |
---|
543 | <detaileddescription> |
---|
544 | </detaileddescription> |
---|
545 | <inbodydescription> |
---|
546 | </inbodydescription> |
---|
547 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="70"/> |
---|
548 | </memberdef> |
---|
549 | <memberdef kind="function" id="itsave_8m_10f8e4f8a2e3d98ab7261a47ac85f679b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
550 | <type></type> |
---|
551 | <definition>min</definition> |
---|
552 | <argsstring>(min(v==round(v)))</argsstring> |
---|
553 | <name>min</name> |
---|
554 | <param> |
---|
555 | <type>min(v==round(v))</type> |
---|
556 | </param> |
---|
557 | <briefdescription> |
---|
558 | </briefdescription> |
---|
559 | <detaileddescription> |
---|
560 | </detaileddescription> |
---|
561 | <inbodydescription> |
---|
562 | </inbodydescription> |
---|
563 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="70"/> |
---|
564 | </memberdef> |
---|
565 | <memberdef kind="function" id="itsave_8m_126546e5ed84229ef79dbfe76d7afeba1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
566 | <type>true if integer or binary</type> |
---|
567 | <definition>true if integer or binary if</definition> |
---|
568 | <argsstring>(isreal(v)&&is_intbin)%binary or integer type if(max(max(v))</argsstring> |
---|
569 | <name>if</name> |
---|
570 | <param> |
---|
571 | <type>isreal(v)&&</type> |
---|
572 | <declname>is_intbin</declname> |
---|
573 | </param> |
---|
574 | <briefdescription> |
---|
575 | </briefdescription> |
---|
576 | <detaileddescription> |
---|
577 | </detaileddescription> |
---|
578 | <inbodydescription> |
---|
579 | </inbodydescription> |
---|
580 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="77"/> |
---|
581 | </memberdef> |
---|
582 | <memberdef kind="function" id="itsave_8m_16aa15e35d1e69ce194c628ae9c9d6247" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
583 | <type>Write header sizes</type> |
---|
584 | <definition>Writes header sizes fwrite</definition> |
---|
585 | <argsstring>(fid,[hdr_bytes data_bytes block_bytes], 'uint64')</argsstring> |
---|
586 | <name>fwrite</name> |
---|
587 | <param> |
---|
588 | <type>fid</type> |
---|
589 | </param> |
---|
590 | <param> |
---|
591 | <type> 'uint64'</type> |
---|
592 | </param> |
---|
593 | <briefdescription> |
---|
594 | </briefdescription> |
---|
595 | <detaileddescription> |
---|
596 | </detaileddescription> |
---|
597 | <inbodydescription> |
---|
598 | </inbodydescription> |
---|
599 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="87"/> |
---|
600 | </memberdef> |
---|
601 | <memberdef kind="function" id="itsave_8m_1732b8a3c86e86597430033b6edcbf499" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
602 | <type>Write variable name as string</type> |
---|
603 | <definition>Writes variable name as string fprintf</definition> |
---|
604 | <argsstring>(fid, '%s%c', vname)</argsstring> |
---|
605 | <name>fprintf</name> |
---|
606 | <param> |
---|
607 | <type>fid</type> |
---|
608 | </param> |
---|
609 | <param> |
---|
610 | <type> '%s%c'</type> |
---|
611 | </param> |
---|
612 | <param> |
---|
613 | <type>vname</type> |
---|
614 | </param> |
---|
615 | <briefdescription> |
---|
616 | </briefdescription> |
---|
617 | <detaileddescription> |
---|
618 | </detaileddescription> |
---|
619 | <inbodydescription> |
---|
620 | </inbodydescription> |
---|
621 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="89"/> |
---|
622 | </memberdef> |
---|
623 | <memberdef kind="function" id="itsave_8m_1cd41dd5eb86728e576c8a175e64ebca8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
624 | <type></type> |
---|
625 | <definition>fwrite</definition> |
---|
626 | <argsstring>(fid, 0, 'char')</argsstring> |
---|
627 | <name>fwrite</name> |
---|
628 | <param> |
---|
629 | <type>fid</type> |
---|
630 | </param> |
---|
631 | <param> |
---|
632 | <type>0</type> |
---|
633 | </param> |
---|
634 | <param> |
---|
635 | <type> 'char'</type> |
---|
636 | </param> |
---|
637 | <briefdescription> |
---|
638 | </briefdescription> |
---|
639 | <detaileddescription> |
---|
640 | </detaileddescription> |
---|
641 | <inbodydescription> |
---|
642 | </inbodydescription> |
---|
643 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="89"/> |
---|
644 | </memberdef> |
---|
645 | <memberdef kind="function" id="itsave_8m_1dfa2e8596da4e4a69ec2065753d14472" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
646 | <type>Write data type empty description string and data size</type> |
---|
647 | <definition>Write data type empty description string and data size if</definition> |
---|
648 | <argsstring>(is_vector) fprintf(fid</argsstring> |
---|
649 | <name>if</name> |
---|
650 | <param> |
---|
651 | <type>is_vector</type> |
---|
652 | </param> |
---|
653 | <briefdescription> |
---|
654 | </briefdescription> |
---|
655 | <detaileddescription> |
---|
656 | </detaileddescription> |
---|
657 | <inbodydescription> |
---|
658 | </inbodydescription> |
---|
659 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="93"/> |
---|
660 | </memberdef> |
---|
661 | <memberdef kind="function" id="itsave_8m_1b6a6ee8950cb64598402f751662b859e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
662 | <type></type> |
---|
663 | <definition>fwrite</definition> |
---|
664 | <argsstring>(fid, size(v(:), 1), 'uint64')</argsstring> |
---|
665 | <name>fwrite</name> |
---|
666 | <param> |
---|
667 | <type>fid</type> |
---|
668 | </param> |
---|
669 | <param> |
---|
670 | <type>size(v(:), 1)</type> |
---|
671 | </param> |
---|
672 | <param> |
---|
673 | <type> 'uint64'</type> |
---|
674 | </param> |
---|
675 | <briefdescription> |
---|
676 | </briefdescription> |
---|
677 | <detaileddescription> |
---|
678 | </detaileddescription> |
---|
679 | <inbodydescription> |
---|
680 | </inbodydescription> |
---|
681 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="94"/> |
---|
682 | </memberdef> |
---|
683 | <memberdef kind="function" id="itsave_8m_146c5f7ee68bad5c8c359eb7121e03fae" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
684 | <type>else a matrix</type> |
---|
685 | <definition>else a matrix fprintf</definition> |
---|
686 | <argsstring>(fid, 'bmat')</argsstring> |
---|
687 | <name>fprintf</name> |
---|
688 | <param> |
---|
689 | <type>fid</type> |
---|
690 | </param> |
---|
691 | <param> |
---|
692 | <type> 'bmat'</type> |
---|
693 | </param> |
---|
694 | <briefdescription> |
---|
695 | </briefdescription> |
---|
696 | <detaileddescription> |
---|
697 | </detaileddescription> |
---|
698 | <inbodydescription> |
---|
699 | </inbodydescription> |
---|
700 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="96"/> |
---|
701 | </memberdef> |
---|
702 | <memberdef kind="function" id="itsave_8m_16885b839cf39dcbf08719e94d6f316bf" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
703 | <type></type> |
---|
704 | <definition>fwrite</definition> |
---|
705 | <argsstring>(fid, size(v), 'uint64')</argsstring> |
---|
706 | <name>fwrite</name> |
---|
707 | <param> |
---|
708 | <type>fid</type> |
---|
709 | </param> |
---|
710 | <param> |
---|
711 | <type>size(v)</type> |
---|
712 | </param> |
---|
713 | <param> |
---|
714 | <type> 'uint64'</type> |
---|
715 | </param> |
---|
716 | <briefdescription> |
---|
717 | </briefdescription> |
---|
718 | <detaileddescription> |
---|
719 | </detaileddescription> |
---|
720 | <inbodydescription> |
---|
721 | </inbodydescription> |
---|
722 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="97"/> |
---|
723 | </memberdef> |
---|
724 | <memberdef kind="function" id="itsave_8m_14905b974332f2fd7b8768572b082d46a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
725 | <type>end Write data</type> |
---|
726 | <definition>end Write data fwrite</definition> |
---|
727 | <argsstring>(fid, v, 'char')</argsstring> |
---|
728 | <name>fwrite</name> |
---|
729 | <param> |
---|
730 | <type>fid</type> |
---|
731 | </param> |
---|
732 | <param> |
---|
733 | <type>v</type> |
---|
734 | </param> |
---|
735 | <param> |
---|
736 | <type> 'char'</type> |
---|
737 | </param> |
---|
738 | <briefdescription> |
---|
739 | </briefdescription> |
---|
740 | <detaileddescription> |
---|
741 | </detaileddescription> |
---|
742 | <inbodydescription> |
---|
743 | </inbodydescription> |
---|
744 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="100"/> |
---|
745 | </memberdef> |
---|
746 | <memberdef kind="function" id="itsave_8m_13dfbe214dbcab8a4dafdd7d2f9734c0b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
747 | <type>else a matrix</type> |
---|
748 | <definition>else a matrix fprintf</definition> |
---|
749 | <argsstring>(fid, 'imat')</argsstring> |
---|
750 | <name>fprintf</name> |
---|
751 | <param> |
---|
752 | <type>fid</type> |
---|
753 | </param> |
---|
754 | <param> |
---|
755 | <type> 'imat'</type> |
---|
756 | </param> |
---|
757 | <briefdescription> |
---|
758 | </briefdescription> |
---|
759 | <detaileddescription> |
---|
760 | </detaileddescription> |
---|
761 | <inbodydescription> |
---|
762 | </inbodydescription> |
---|
763 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="125"/> |
---|
764 | </memberdef> |
---|
765 | <memberdef kind="function" id="itsave_8m_14c33543a52869d864d777dfdb5388f87" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
766 | <type>end Write data</type> |
---|
767 | <definition>end Write data fwrite</definition> |
---|
768 | <argsstring>(fid, v, 'int32')</argsstring> |
---|
769 | <name>fwrite</name> |
---|
770 | <param> |
---|
771 | <type>fid</type> |
---|
772 | </param> |
---|
773 | <param> |
---|
774 | <type>v</type> |
---|
775 | </param> |
---|
776 | <param> |
---|
777 | <type> 'int32'</type> |
---|
778 | </param> |
---|
779 | <briefdescription> |
---|
780 | </briefdescription> |
---|
781 | <detaileddescription> |
---|
782 | </detaileddescription> |
---|
783 | <inbodydescription> |
---|
784 | </inbodydescription> |
---|
785 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="129"/> |
---|
786 | </memberdef> |
---|
787 | <memberdef kind="function" id="itsave_8m_15c9ee41a9de83d628104472c1f02323f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
788 | <type>end binary or integer</type> |
---|
789 | <definition>end binary or integer elseif</definition> |
---|
790 | <argsstring>(isa(v, 'double'))%double precision floating point type if(isreal(v))%Check if real values%Calculate sizes if(is_vector) hdr_bytes</argsstring> |
---|
791 | <name>elseif</name> |
---|
792 | <param> |
---|
793 | <type>isa(v, 'double')</type> |
---|
794 | </param> |
---|
795 | <briefdescription> |
---|
796 | </briefdescription> |
---|
797 | <detaileddescription> |
---|
798 | </detaileddescription> |
---|
799 | <inbodydescription> |
---|
800 | </inbodydescription> |
---|
801 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="137"/> |
---|
802 | </memberdef> |
---|
803 | <memberdef kind="function" id="itsave_8m_1a39e1c50f6d00aacc15b1fd3a08e35e8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
804 | <type>else a matrix</type> |
---|
805 | <definition>else a matrix fprintf</definition> |
---|
806 | <argsstring>(fid, 'dmat')</argsstring> |
---|
807 | <name>fprintf</name> |
---|
808 | <param> |
---|
809 | <type>fid</type> |
---|
810 | </param> |
---|
811 | <param> |
---|
812 | <type> 'dmat'</type> |
---|
813 | </param> |
---|
814 | <briefdescription> |
---|
815 | </briefdescription> |
---|
816 | <detaileddescription> |
---|
817 | </detaileddescription> |
---|
818 | <inbodydescription> |
---|
819 | </inbodydescription> |
---|
820 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="156"/> |
---|
821 | </memberdef> |
---|
822 | <memberdef kind="function" id="itsave_8m_1e80f8f39da4aed9c91b1a240a577b17f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
823 | <type>end</type> |
---|
824 | <definition>end fwrite</definition> |
---|
825 | <argsstring>(fid, v, 'float64')</argsstring> |
---|
826 | <name>fwrite</name> |
---|
827 | <param> |
---|
828 | <type>fid</type> |
---|
829 | </param> |
---|
830 | <param> |
---|
831 | <type>v</type> |
---|
832 | </param> |
---|
833 | <param> |
---|
834 | <type> 'float64'</type> |
---|
835 | </param> |
---|
836 | <briefdescription> |
---|
837 | </briefdescription> |
---|
838 | <detaileddescription> |
---|
839 | </detaileddescription> |
---|
840 | <inbodydescription> |
---|
841 | </inbodydescription> |
---|
842 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="159"/> |
---|
843 | </memberdef> |
---|
844 | <memberdef kind="function" id="itsave_8m_1416044e0e110c71042f7be9014fa78e2" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
845 | <type>Write variable name as string</type> |
---|
846 | <definition>Write variable name as string fprintf</definition> |
---|
847 | <argsstring>(fid, '%s', vname)</argsstring> |
---|
848 | <name>fprintf</name> |
---|
849 | <param> |
---|
850 | <type>fid</type> |
---|
851 | </param> |
---|
852 | <param> |
---|
853 | <type> '%s'</type> |
---|
854 | </param> |
---|
855 | <param> |
---|
856 | <type>vname</type> |
---|
857 | </param> |
---|
858 | <briefdescription> |
---|
859 | </briefdescription> |
---|
860 | <detaileddescription> |
---|
861 | </detaileddescription> |
---|
862 | <inbodydescription> |
---|
863 | </inbodydescription> |
---|
864 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="179"/> |
---|
865 | </memberdef> |
---|
866 | <memberdef kind="function" id="itsave_8m_111c7347808facfc8824a564233bf4fb6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
867 | <type>empty description string and data size</type> |
---|
868 | <definition>empty description string and data size fprintf</definition> |
---|
869 | <argsstring>(fid, 'dcvec')</argsstring> |
---|
870 | <name>fprintf</name> |
---|
871 | <param> |
---|
872 | <type>fid</type> |
---|
873 | </param> |
---|
874 | <param> |
---|
875 | <type> 'dcvec'</type> |
---|
876 | </param> |
---|
877 | <briefdescription> |
---|
878 | </briefdescription> |
---|
879 | <detaileddescription> |
---|
880 | </detaileddescription> |
---|
881 | <inbodydescription> |
---|
882 | </inbodydescription> |
---|
883 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="183"/> |
---|
884 | </memberdef> |
---|
885 | <memberdef kind="function" id="itsave_8m_13b8ba2049bd9b12e02c93fb8d2e6b3b7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
886 | <type></type> |
---|
887 | <definition>fwrite</definition> |
---|
888 | <argsstring>(fid, imag(v(i)), 'float64')</argsstring> |
---|
889 | <name>fwrite</name> |
---|
890 | <param> |
---|
891 | <type>fid</type> |
---|
892 | </param> |
---|
893 | <param> |
---|
894 | <type>imag(v(i))</type> |
---|
895 | </param> |
---|
896 | <param> |
---|
897 | <type> 'float64'</type> |
---|
898 | </param> |
---|
899 | <briefdescription> |
---|
900 | </briefdescription> |
---|
901 | <detaileddescription> |
---|
902 | </detaileddescription> |
---|
903 | <inbodydescription> |
---|
904 | </inbodydescription> |
---|
905 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="188"/> |
---|
906 | </memberdef> |
---|
907 | <memberdef kind="function" id="itsave_8m_1a3492374b3fc5a5ea3d14e9265eda2be" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
908 | <type>end else a matrix Write data type empty description string and data size</type> |
---|
909 | <definition>end else a matrix Write data type empty description string and data size fprintf</definition> |
---|
910 | <argsstring>(fid, 'dcmat')</argsstring> |
---|
911 | <name>fprintf</name> |
---|
912 | <param> |
---|
913 | <type>fid</type> |
---|
914 | </param> |
---|
915 | <param> |
---|
916 | <type> 'dcmat'</type> |
---|
917 | </param> |
---|
918 | <briefdescription> |
---|
919 | </briefdescription> |
---|
920 | <detaileddescription> |
---|
921 | </detaileddescription> |
---|
922 | <inbodydescription> |
---|
923 | </inbodydescription> |
---|
924 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="192"/> |
---|
925 | </memberdef> |
---|
926 | <memberdef kind="function" id="itsave_8m_1c5f506d26a8fc8279d12e16697fcb0e1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
927 | <type></type> |
---|
928 | <definition>fwrite</definition> |
---|
929 | <argsstring>(fid, imag(v(i, j)), 'float64')</argsstring> |
---|
930 | <name>fwrite</name> |
---|
931 | <param> |
---|
932 | <type>fid</type> |
---|
933 | </param> |
---|
934 | <param> |
---|
935 | <type>imag(v(i, j))</type> |
---|
936 | </param> |
---|
937 | <param> |
---|
938 | <type> 'float64'</type> |
---|
939 | </param> |
---|
940 | <briefdescription> |
---|
941 | </briefdescription> |
---|
942 | <detaileddescription> |
---|
943 | </detaileddescription> |
---|
944 | <inbodydescription> |
---|
945 | </inbodydescription> |
---|
946 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="198"/> |
---|
947 | </memberdef> |
---|
948 | <memberdef kind="function" id="itsave_8m_1c7c4c2538297c5074ec6924682557698" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
949 | <type>end end end end real or complex else</type> |
---|
950 | <definition>end end end end real or complex else warning</definition> |
---|
951 | <argsstring>(['Variable '''vname '''is neither a vector nor matrix.Not saved.'])</argsstring> |
---|
952 | <name>warning</name> |
---|
953 | <briefdescription> |
---|
954 | </briefdescription> |
---|
955 | <detaileddescription> |
---|
956 | </detaileddescription> |
---|
957 | <inbodydescription> |
---|
958 | </inbodydescription> |
---|
959 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="204"/> |
---|
960 | </memberdef> |
---|
961 | <memberdef kind="function" id="itsave_8m_1c1c641b9fd0cf5478fbffe3739e6d689" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
962 | <type>end end</type> |
---|
963 | <definition>end end fclose</definition> |
---|
964 | <argsstring>(fid)</argsstring> |
---|
965 | <name>fclose</name> |
---|
966 | <param> |
---|
967 | <type>fid</type> |
---|
968 | </param> |
---|
969 | <briefdescription> |
---|
970 | </briefdescription> |
---|
971 | <detaileddescription> |
---|
972 | </detaileddescription> |
---|
973 | <inbodydescription> |
---|
974 | </inbodydescription> |
---|
975 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="209"/> |
---|
976 | </memberdef> |
---|
977 | <memberdef kind="function" id="itsave_8m_18626954d4efdb13284810539d1c72971" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
978 | <type>sizeof</type> |
---|
979 | <definition>sizeof function</definition> |
---|
980 | <argsstring>(like C-style sizeof)%returns no.bytes used by a variable function nbytes</argsstring> |
---|
981 | <name>function</name> |
---|
982 | <param> |
---|
983 | <type>like C-style</type> |
---|
984 | <declname>sizeof</declname> |
---|
985 | </param> |
---|
986 | <briefdescription> |
---|
987 | </briefdescription> |
---|
988 | <detaileddescription> |
---|
989 | </detaileddescription> |
---|
990 | <inbodydescription> |
---|
991 | </inbodydescription> |
---|
992 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m" line="216"/> |
---|
993 | </memberdef> |
---|
994 | </sectiondef> |
---|
995 | <briefdescription> |
---|
996 | </briefdescription> |
---|
997 | <detaileddescription> |
---|
998 | </detaileddescription> |
---|
999 | <programlisting> |
---|
1000 | <codeline lineno="1"><highlight class="normal">%<sp/>File:<sp/><sp/><sp/>itsave.m</highlight></codeline> |
---|
1001 | <codeline lineno="2"><highlight class="normal">%<sp/>Brief:<sp/><sp/>Saves<sp/>Matlab/Octave<sp/>workspace<sp/>variables<sp/>to<sp/>an<sp/>IT++<sp/>itfile</highlight></codeline> |
---|
1002 | <codeline lineno="3"><highlight class="normal">%<sp/>Author:<sp/>Tony<sp/>Ottosson<sp/>and<sp/>Adam<sp/>Piatyszek</highlight></codeline> |
---|
1003 | <codeline lineno="4"><highlight class="normal">%</highlight></codeline> |
---|
1004 | <codeline lineno="5"><highlight class="normal">%<sp/>Usage:<sp/>itsave("fname.it",<sp/>var1,<sp/>[var2],<sp/>...)</highlight></codeline> |
---|
1005 | <codeline lineno="6"><highlight class="normal">%</highlight></codeline> |
---|
1006 | <codeline lineno="7"><highlight class="normal">%<sp/>This<sp/>function<sp/>saves<sp/>a<sp/>set<sp/>of<sp/>Matlab/Octave<sp/>workspace<sp/>variables<sp/>to<sp/>an<sp/>IT++</highlight></codeline> |
---|
1007 | <codeline lineno="8"><highlight class="normal">%<sp/>file<sp/>format.<sp/>Currently,<sp/>only<sp/>vectors<sp/>and<sp/>2-D<sp/>matrices<sp/>can<sp/>be<sp/>saved.<sp/>The</highlight></codeline> |
---|
1008 | <codeline lineno="9"><highlight class="normal">%<sp/>type<sp/>of<sp/>data<sp/>saved<sp/>is<sp/>detected<sp/>automatically<sp/>and<sp/>can<sp/>be<sp/>one<sp/>of<sp/>the</highlight></codeline> |
---|
1009 | <codeline lineno="10"><highlight class="normal">%<sp/>following<sp/>types:<sp/>bvec,<sp/>bmat,<sp/>ivec,<sp/>imat,<sp/>vec,<sp/>mat,<sp/>cvec,<sp/>cmat.</highlight></codeline> |
---|
1010 | <codeline lineno="11"><highlight class="normal">%</highlight></codeline> |
---|
1011 | <codeline lineno="12"><highlight class="normal">%<sp/>-------------------------------------------------------------------------</highlight></codeline> |
---|
1012 | <codeline lineno="13"><highlight class="normal">%</highlight></codeline> |
---|
1013 | <codeline lineno="14"><highlight class="normal">%<sp/>IT++<sp/>-<sp/>C++<sp/>library<sp/>of<sp/>mathematical,<sp/>signal<sp/>processing,<sp/>speech<sp/>processing,</highlight></codeline> |
---|
1014 | <codeline lineno="15"><highlight class="normal">%<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>and<sp/>communications<sp/>classes<sp/>and<sp/>functions</highlight></codeline> |
---|
1015 | <codeline lineno="16"><highlight class="normal">%</highlight></codeline> |
---|
1016 | <codeline lineno="17"><highlight class="normal">%<sp/>Copyright<sp/>(C)<sp/>1995-2007<sp/><sp/>(see<sp/>AUTHORS<sp/>file<sp/>for<sp/>a<sp/>list<sp/>of<sp/>contributors)</highlight></codeline> |
---|
1017 | <codeline lineno="18"><highlight class="normal">%</highlight></codeline> |
---|
1018 | <codeline lineno="19"><highlight class="normal">%<sp/>This<sp/>program<sp/>is<sp/>free<sp/>software;<sp/>you<sp/>can<sp/>redistribute<sp/>it<sp/>and/or<sp/>modify</highlight></codeline> |
---|
1019 | <codeline lineno="20"><highlight class="normal">%<sp/>it<sp/>under<sp/>the<sp/>terms<sp/>of<sp/>the<sp/>GNU<sp/>General<sp/>Public<sp/>License<sp/>as<sp/>published<sp/>by</highlight></codeline> |
---|
1020 | <codeline lineno="21"><highlight class="normal">%<sp/>the<sp/>Free<sp/>Software<sp/>Foundation;<sp/>either<sp/>version<sp/>2<sp/>of<sp/>the<sp/>License,<sp/>or</highlight></codeline> |
---|
1021 | <codeline lineno="22"><highlight class="normal">%<sp/>(at<sp/>your<sp/>option)<sp/>any<sp/>later<sp/>version.</highlight></codeline> |
---|
1022 | <codeline lineno="23"><highlight class="normal">%</highlight></codeline> |
---|
1023 | <codeline lineno="24"><highlight class="normal">%<sp/>This<sp/>program<sp/>is<sp/>distributed<sp/>in<sp/>the<sp/>hope<sp/>that<sp/>it<sp/>will<sp/>be<sp/>useful,</highlight></codeline> |
---|
1024 | <codeline lineno="25"><highlight class="normal">%<sp/>but<sp/>WITHOUT<sp/>ANY<sp/>WARRANTY;<sp/>without<sp/>even<sp/>the<sp/>implied<sp/>warranty<sp/>of</highlight></codeline> |
---|
1025 | <codeline lineno="26"><highlight class="normal">%<sp/>MERCHANTABILITY<sp/>or<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE.<sp/><sp/>See<sp/>the</highlight></codeline> |
---|
1026 | <codeline lineno="27"><highlight class="normal">%<sp/>GNU<sp/>General<sp/>Public<sp/>License<sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>more<sp/>details.</highlight></codeline> |
---|
1027 | <codeline lineno="28"><highlight class="normal">%</highlight></codeline> |
---|
1028 | <codeline lineno="29"><highlight class="normal">%<sp/>You<sp/>should<sp/>have<sp/>received<sp/>a<sp/>copy<sp/>of<sp/>the<sp/>GNU<sp/>General<sp/>Public<sp/>License</highlight></codeline> |
---|
1029 | <codeline lineno="30"><highlight class="normal">%<sp/>along<sp/>with<sp/></highlight><highlight class="keyword">this</highlight><highlight class="normal"><sp/>program;<sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>not,<sp/>write<sp/>to<sp/>the<sp/>Free<sp/>Software</highlight></codeline> |
---|
1030 | <codeline lineno="31"><highlight class="normal">%<sp/>Foundation,<sp/>Inc.,<sp/>51<sp/>Franklin<sp/>St,<sp/>Fifth<sp/>Floor,<sp/>Boston,<sp/>MA<sp/>02110-1301<sp/>USA</highlight></codeline> |
---|
1031 | <codeline lineno="32"><highlight class="normal">%</highlight></codeline> |
---|
1032 | <codeline lineno="33"><highlight class="normal">%<sp/>-------------------------------------------------------------------------</highlight></codeline> |
---|
1033 | <codeline lineno="34"><highlight class="normal"></highlight></codeline> |
---|
1034 | <codeline lineno="35"><highlight class="normal"></highlight></codeline> |
---|
1035 | <codeline lineno="36"><highlight class="normal">function<sp/>itsave(fname,<sp/>varargin)</highlight></codeline> |
---|
1036 | <codeline lineno="37"><highlight class="normal"></highlight></codeline> |
---|
1037 | <codeline lineno="38"><highlight class="normal"></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(nargin<sp/>><sp/>1)</highlight></codeline> |
---|
1038 | <codeline lineno="39"><highlight class="normal"><sp/><sp/>vars<sp/>=<sp/>varargin;</highlight></codeline> |
---|
1039 | <codeline lineno="40"><highlight class="normal"></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
1040 | <codeline lineno="41"><highlight class="normal"><sp/><sp/>error(</highlight><highlight class="stringliteral">'Usage:<sp/>itsave("fname.it",<sp/>var1,<sp/>[var2],<sp/>...)'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1041 | <codeline lineno="42"><highlight class="normal">end</highlight></codeline> |
---|
1042 | <codeline lineno="43"><highlight class="normal"></highlight></codeline> |
---|
1043 | <codeline lineno="44"><highlight class="normal">nargs<sp/>=<sp/>size(vars,2);</highlight></codeline> |
---|
1044 | <codeline lineno="45"><highlight class="normal"></highlight></codeline> |
---|
1045 | <codeline lineno="46"><highlight class="normal">%<sp/>The<sp/>current<sp/>file-version<sp/>of<sp/>it_file</highlight></codeline> |
---|
1046 | <codeline lineno="47"><highlight class="normal">file_version<sp/>=<sp/>3;</highlight></codeline> |
---|
1047 | <codeline lineno="48"><highlight class="normal"></highlight></codeline> |
---|
1048 | <codeline lineno="49"><highlight class="normal">[fid,<sp/>err_msg]<sp/>=<sp/>fopen(fname,<sp/></highlight><highlight class="stringliteral">'wb'</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">'ieee-le'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1049 | <codeline lineno="50"><highlight class="normal"></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fid<sp/>==<sp/>-1)</highlight></codeline> |
---|
1050 | <codeline lineno="51"><highlight class="normal"><sp/><sp/>error(err_msg);</highlight></codeline> |
---|
1051 | <codeline lineno="52"><highlight class="normal">end</highlight></codeline> |
---|
1052 | <codeline lineno="53"><highlight class="normal"></highlight></codeline> |
---|
1053 | <codeline lineno="54"><highlight class="normal">%<sp/>Write<sp/>a<sp/>file<sp/>header<sp/>consisting<sp/>of<sp/></highlight><highlight class="stringliteral">"IT++"</highlight><highlight class="normal"><sp/>and<sp/>a<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>containing<sp/>the<sp/>file</highlight></codeline> |
---|
1054 | <codeline lineno="55"><highlight class="normal">%<sp/>version<sp/>number</highlight></codeline> |
---|
1055 | <codeline lineno="56"><highlight class="normal">fprintf(fid,<sp/></highlight><highlight class="stringliteral">'IT++%c'</highlight><highlight class="normal">,<sp/>file_version);</highlight></codeline> |
---|
1056 | <codeline lineno="57"><highlight class="normal"></highlight></codeline> |
---|
1057 | <codeline lineno="58"><highlight class="normal"></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>ai=1:nargs</highlight></codeline> |
---|
1058 | <codeline lineno="59"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(exist(</highlight><highlight class="stringliteral">'OCTAVE_VERSION'</highlight><highlight class="normal">))<sp/>%<sp/>check<sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>octave</highlight></codeline> |
---|
1059 | <codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>vname<sp/>=<sp/>deblank(argn(ai+1,:));<sp/>%<sp/>octave<sp/>way<sp/>of<sp/>getting<sp/>parameter<sp/>name</highlight></codeline> |
---|
1060 | <codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>is_octave=1;<sp/>%used<sp/>by<sp/>function<sp/>itsizeof<sp/>to<sp/>identify<sp/>octave</highlight></codeline> |
---|
1061 | <codeline lineno="62"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
1062 | <codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>vname<sp/>=<sp/>inputname(ai+1);<sp/>%<sp/>matlab<sp/>way<sp/>of<sp/>getting<sp/>parameter<sp/>name</highlight></codeline> |
---|
1063 | <codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>is_octave=0;<sp/>%used<sp/>by<sp/>function<sp/>itsizeof<sp/>to<sp/>identify<sp/>matlab</highlight></codeline> |
---|
1064 | <codeline lineno="65"><highlight class="normal"><sp/><sp/>end</highlight></codeline> |
---|
1065 | <codeline lineno="66"><highlight class="normal"><sp/><sp/>v<sp/>=<sp/>vars{ai};</highlight></codeline> |
---|
1066 | <codeline lineno="67"><highlight class="normal"></highlight></codeline> |
---|
1067 | <codeline lineno="68"><highlight class="normal"><sp/><sp/>is_scalar<sp/>=<sp/>all(size(v)<sp/>==<sp/>1);<sp/>%<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>scalar<sp/>(</highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>future<sp/>use)</highlight></codeline> |
---|
1068 | <codeline lineno="69"><highlight class="normal"><sp/><sp/>is_vector<sp/>=<sp/>0;%(sum(size(v)<sp/>><sp/>1)<sp/><=<sp/>1);<sp/>%<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>a<sp/>vector<sp/>(or<sp/>a<sp/>scalar)</highlight></codeline> |
---|
1069 | <codeline lineno="70"><highlight class="normal"><sp/><sp/>is_intbin<sp/>=<sp/>0;%min(min(v<sp/>==<sp/>round(v)));<sp/>%<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>integer<sp/>or<sp/>binary</highlight></codeline> |
---|
1070 | <codeline lineno="71"><highlight class="normal"></highlight></codeline> |
---|
1071 | <codeline lineno="72"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>isreal(v)<sp/>&&<sp/>is_intbin<sp/>)<sp/>%<sp/>binary<sp/>or<sp/>integer<sp/>type</highlight></codeline> |
---|
1072 | <codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(max(max(v))<sp/>==<sp/>1<sp/>&&<sp/>min(min(v))<sp/>==<sp/>0)<sp/>%<sp/>binary<sp/>type</highlight></codeline> |
---|
1073 | <codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Calculate<sp/>sizes</highlight></codeline> |
---|
1074 | <codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_vector)</highlight></codeline> |
---|
1075 | <codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdr_bytes<sp/>=<sp/>3<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>size(vname,2)+1<sp/>...</highlight></codeline> |
---|
1076 | <codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+<sp/>itsizeof('bvec',is_octave)+1<sp/>+1;</highlight></codeline> |
---|
1077 | <codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data_bytes<sp/>=<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>itsizeof(char(0),is_octave)<sp/>*<sp/>prod(size(v));</highlight></codeline> |
---|
1078 | <codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>%<sp/>a<sp/>matrix</highlight></codeline> |
---|
1079 | <codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdr_bytes<sp/>=<sp/>3<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>size(vname,2)+1<sp/>...</highlight></codeline> |
---|
1080 | <codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+<sp/>itsizeof('bmat',is_octave)+1<sp/>+1;</highlight></codeline> |
---|
1081 | <codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data_bytes<sp/>=<sp/>2<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>itsizeof(char(0),is_octave)<sp/>*<sp/>prod(size(v));</highlight></codeline> |
---|
1082 | <codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1083 | <codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>block_bytes<sp/>=<sp/>hdr_bytes<sp/>+<sp/>data_bytes;</highlight></codeline> |
---|
1084 | <codeline lineno="85"><highlight class="normal"></highlight></codeline> |
---|
1085 | <codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>header<sp/>sizes</highlight></codeline> |
---|
1086 | <codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>[hdr_bytes<sp/>data_bytes<sp/>block_bytes],<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1087 | <codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>variable<sp/>name<sp/>as<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"></highlight></codeline> |
---|
1088 | <codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'%s%c'</highlight><highlight class="normal">,<sp/>vname);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1089 | <codeline lineno="90"><highlight class="normal"></highlight></codeline> |
---|
1090 | <codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>data<sp/>type<sp/>string,<sp/>empty<sp/>description<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>and<sp/>data<sp/>size</highlight></codeline> |
---|
1091 | <codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_vector)</highlight></codeline> |
---|
1092 | <codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'bvec'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1093 | <codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>size(v(:),1),<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1094 | <codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>%<sp/>a<sp/>matrix</highlight></codeline> |
---|
1095 | <codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'bmat'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1096 | <codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>size(v),<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1097 | <codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1098 | <codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>data</highlight></codeline> |
---|
1099 | <codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>v,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1100 | <codeline lineno="101"><highlight class="normal"></highlight></codeline> |
---|
1101 | <codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>%<sp/>integer<sp/>type</highlight></codeline> |
---|
1102 | <codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Calculate<sp/>sizes</highlight></codeline> |
---|
1103 | <codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_vector)</highlight></codeline> |
---|
1104 | <codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdr_bytes<sp/>=<sp/>3<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>size(vname,2)+1<sp/>...</highlight></codeline> |
---|
1105 | <codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+<sp/>itsizeof('ivec',is_octave)+1<sp/>+1;</highlight></codeline> |
---|
1106 | <codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data_bytes<sp/>=<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>itsizeof(int32(0),is_octave)<sp/>*<sp/>prod(size(v));</highlight></codeline> |
---|
1107 | <codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>%<sp/>a<sp/>matrix</highlight></codeline> |
---|
1108 | <codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdr_bytes<sp/>=<sp/>3<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>size(vname,2)+1<sp/>...</highlight></codeline> |
---|
1109 | <codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+<sp/>itsizeof('imat',is_octave)+1<sp/>+1;</highlight></codeline> |
---|
1110 | <codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data_bytes<sp/>=<sp/>2<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>itsizeof(int32(0),is_octave)<sp/>*<sp/>prod(size(v));</highlight></codeline> |
---|
1111 | <codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1112 | <codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>block_bytes<sp/>=<sp/>hdr_bytes<sp/>+<sp/>data_bytes;</highlight></codeline> |
---|
1113 | <codeline lineno="114"><highlight class="normal"></highlight></codeline> |
---|
1114 | <codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>header<sp/>sizes</highlight></codeline> |
---|
1115 | <codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>[hdr_bytes<sp/>data_bytes<sp/>block_bytes],<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1116 | <codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>variable<sp/>name<sp/>as<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"></highlight></codeline> |
---|
1117 | <codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'%s%c'</highlight><highlight class="normal">,<sp/>vname);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1118 | <codeline lineno="119"><highlight class="normal"></highlight></codeline> |
---|
1119 | <codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>data<sp/>type<sp/>string,<sp/>empty<sp/>description<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>and<sp/>data<sp/>size</highlight></codeline> |
---|
1120 | <codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_vector)</highlight></codeline> |
---|
1121 | <codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'ivec'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1122 | <codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>size(v(:),1),<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1123 | <codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>%<sp/>a<sp/>matrix</highlight></codeline> |
---|
1124 | <codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'imat'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1125 | <codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>size(v),<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1126 | <codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1127 | <codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>data</highlight></codeline> |
---|
1128 | <codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>v,<sp/></highlight><highlight class="stringliteral">'int32'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1129 | <codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/>end<sp/>%<sp/>binary<sp/>or<sp/>integer</highlight></codeline> |
---|
1130 | <codeline lineno="131"><highlight class="normal"></highlight></codeline> |
---|
1131 | <codeline lineno="132"><highlight class="normal"><sp/><sp/>elseif<sp/>(isa(v,<sp/></highlight><highlight class="stringliteral">'double'</highlight><highlight class="normal">))<sp/>%<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>precision<sp/>floating<sp/>point<sp/>type</highlight></codeline> |
---|
1132 | <codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(isreal(v))<sp/>%<sp/>Check<sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>real<sp/>values</highlight></codeline> |
---|
1133 | <codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Calculate<sp/>sizes</highlight></codeline> |
---|
1134 | <codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_vector)</highlight></codeline> |
---|
1135 | <codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdr_bytes<sp/>=<sp/>3<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>size(vname,2)+1<sp/>...</highlight></codeline> |
---|
1136 | <codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+<sp/>itsizeof('dvec',is_octave)+1<sp/>+<sp/>1;</highlight></codeline> |
---|
1137 | <codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data_bytes<sp/>=<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>itsizeof(double(0),is_octave)<sp/>*<sp/>prod(size(v));</highlight></codeline> |
---|
1138 | <codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>%<sp/>a<sp/>matrix</highlight></codeline> |
---|
1139 | <codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdr_bytes<sp/>=<sp/>3<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>size(vname,2)+1<sp/>...</highlight></codeline> |
---|
1140 | <codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+<sp/>itsizeof('dmat',is_octave)+1<sp/>+<sp/>1;</highlight></codeline> |
---|
1141 | <codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data_bytes<sp/>=<sp/>2<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>itsizeof(double(0),is_octave)<sp/>...</highlight></codeline> |
---|
1142 | <codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>prod(size(v));</highlight></codeline> |
---|
1143 | <codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1144 | <codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>block_bytes<sp/>=<sp/>hdr_bytes<sp/>+<sp/>data_bytes;</highlight></codeline> |
---|
1145 | <codeline lineno="146"><highlight class="normal"></highlight></codeline> |
---|
1146 | <codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>a<sp/>header</highlight></codeline> |
---|
1147 | <codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>[hdr_bytes<sp/>data_bytes<sp/>block_bytes],<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1148 | <codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Writes<sp/>variable<sp/>name<sp/>as<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"></highlight></codeline> |
---|
1149 | <codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'%s%c'</highlight><highlight class="normal">,<sp/>vname);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1150 | <codeline lineno="151"><highlight class="normal"></highlight></codeline> |
---|
1151 | <codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_vector)</highlight></codeline> |
---|
1152 | <codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'dvec'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1153 | <codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>size(v(:),1),<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1154 | <codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>%<sp/>a<sp/>matrix</highlight></codeline> |
---|
1155 | <codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'dmat'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1156 | <codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>size(v),<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1157 | <codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1158 | <codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>v,<sp/></highlight><highlight class="stringliteral">'float64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1159 | <codeline lineno="160"><highlight class="normal"></highlight></codeline> |
---|
1160 | <codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>%<sp/>complex<sp/>values</highlight></codeline> |
---|
1161 | <codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Calculate<sp/>sizes</highlight></codeline> |
---|
1162 | <codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_vector)</highlight></codeline> |
---|
1163 | <codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdr_bytes<sp/>=<sp/>3<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>size(vname,2)+1<sp/>...</highlight></codeline> |
---|
1164 | <codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+<sp/>itsizeof('dcvec',is_octave)+1<sp/>+<sp/>1;</highlight></codeline> |
---|
1165 | <codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data_bytes<sp/>=<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>2<sp/>*<sp/>itsizeof(double(0),is_octave)<sp/>...</highlight></codeline> |
---|
1166 | <codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>prod(size(v));</highlight></codeline> |
---|
1167 | <codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>%<sp/>a<sp/>matrix</highlight></codeline> |
---|
1168 | <codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdr_bytes<sp/>=<sp/>3<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>size(vname,2)+1<sp/>...</highlight></codeline> |
---|
1169 | <codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>+<sp/>itsizeof('dcmat',is_octave)+1<sp/>+<sp/>1;</highlight></codeline> |
---|
1170 | <codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data_bytes<sp/>=<sp/>2<sp/>*<sp/>itsizeof(uint64(0),is_octave)<sp/>+<sp/>2<sp/>*<sp/>itsizeof(double(0),is_octave)<sp/>...</highlight></codeline> |
---|
1171 | <codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>prod(size(v));</highlight></codeline> |
---|
1172 | <codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1173 | <codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>block_bytes<sp/>=<sp/>hdr_bytes<sp/>+<sp/>data_bytes;</highlight></codeline> |
---|
1174 | <codeline lineno="175"><highlight class="normal"></highlight></codeline> |
---|
1175 | <codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Writes<sp/>header<sp/>sizes</highlight></codeline> |
---|
1176 | <codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>[hdr_bytes<sp/>data_bytes<sp/>block_bytes],<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1177 | <codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>variable<sp/>name<sp/>as<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"></highlight></codeline> |
---|
1178 | <codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'%s'</highlight><highlight class="normal">,<sp/>vname);<sp/><sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1179 | <codeline lineno="180"><highlight class="normal"></highlight></codeline> |
---|
1180 | <codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_vector)</highlight></codeline> |
---|
1181 | <codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>data<sp/>type<sp/>string,<sp/>empty<sp/>description<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>and<sp/>data<sp/>size</highlight></codeline> |
---|
1182 | <codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/></highlight><highlight class="stringliteral">'dcvec'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);<sp/>fwrite(fid,<sp/>0,<sp/></highlight><highlight class="stringliteral">'char'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1183 | <codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>size(v(:),1),<sp/></highlight><highlight class="stringliteral">'uint64'</highlight><highlight class="normal">);</highlight></codeline> |
---|
1184 | <codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>data</highlight></codeline> |
---|
1185 | <codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>i=1:size(v(:),1)</highlight></codeline> |
---|
1186 | <codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>real(v(i)),<sp/>'float64');</highlight></codeline> |
---|
1187 | <codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>imag(v(i)),<sp/>'float64');</highlight></codeline> |
---|
1188 | <codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1189 | <codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>else<sp/>%<sp/>a<sp/>matrix</highlight></codeline> |
---|
1190 | <codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>data<sp/>type<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal">,<sp/>empty<sp/>description<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>and<sp/>data<sp/>size</highlight></codeline> |
---|
1191 | <codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(fid,<sp/>'dcmat');<sp/>fwrite(fid,<sp/>0,<sp/>'</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">');<sp/>fwrite(fid,<sp/>0,<sp/>'</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">');</highlight></codeline> |
---|
1192 | <codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>size(v),<sp/>'uint64');</highlight></codeline> |
---|
1193 | <codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>Write<sp/>data</highlight></codeline> |
---|
1194 | <codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>for<sp/>j=1:size(v,2)</highlight></codeline> |
---|
1195 | <codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>for<sp/>i=1:size(v,1)</highlight></codeline> |
---|
1196 | <codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>real(v(i,j)),<sp/>'float64');</highlight></codeline> |
---|
1197 | <codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fwrite(fid,<sp/>imag(v(i,j)),<sp/>'float64');</highlight></codeline> |
---|
1198 | <codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1199 | <codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1200 | <codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
1201 | <codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/>end<sp/>%<sp/>real<sp/>or<sp/>complex</highlight></codeline> |
---|
1202 | <codeline lineno="203"><highlight class="normal"><sp/><sp/>else</highlight></codeline> |
---|
1203 | <codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>warning(['Variable<sp/>'''<sp/>vname<sp/>'''<sp/>is<sp/>neither<sp/>a<sp/>vector<sp/>nor<sp/>matrix.<sp/>Not<sp/>saved.']);</highlight></codeline> |
---|
1204 | <codeline lineno="205"><highlight class="normal"><sp/><sp/>end</highlight></codeline> |
---|
1205 | <codeline lineno="206"><highlight class="normal"></highlight></codeline> |
---|
1206 | <codeline lineno="207"><highlight class="normal">end</highlight></codeline> |
---|
1207 | <codeline lineno="208"><highlight class="normal"></highlight></codeline> |
---|
1208 | <codeline lineno="209"><highlight class="normal">fclose(fid);</highlight></codeline> |
---|
1209 | <codeline lineno="210"><highlight class="normal"></highlight></codeline> |
---|
1210 | <codeline lineno="211"><highlight class="normal"></highlight></codeline> |
---|
1211 | <codeline lineno="212"><highlight class="normal">%<sp/>sizeof<sp/>function<sp/>(like<sp/>C-style<sp/>sizeof)</highlight></codeline> |
---|
1212 | <codeline lineno="213"><highlight class="normal">%<sp/>returns<sp/>no.<sp/>bytes<sp/>used<sp/>by<sp/>a<sp/>variable</highlight></codeline> |
---|
1213 | <codeline lineno="214"><highlight class="normal">function<sp/>nbytes=itsizeof(in,is_octave)</highlight></codeline> |
---|
1214 | <codeline lineno="215"><highlight class="normal"><sp/><sp/>if<sp/>(~is_octave)</highlight></codeline> |
---|
1215 | <codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/>tmp=whos('in');</highlight></codeline> |
---|
1216 | <codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/>nbytes=tmp.bytes;</highlight></codeline> |
---|
1217 | <codeline lineno="218"><highlight class="normal"></highlight></codeline> |
---|
1218 | <codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>matlab<sp/>uses<sp/>2<sp/>bytes<sp/>by<sp/>default<sp/>for<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"></highlight></codeline> |
---|
1219 | <codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>overwrite<sp/>using<sp/>1<sp/>byte<sp/>for<sp/>file<sp/>format</highlight></codeline> |
---|
1220 | <codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/>if<sp/>(ischar(in))</highlight></codeline> |
---|
1221 | <codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>nbytes=size(in,2);</highlight></codeline> |
---|
1222 | <codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/>end;</highlight></codeline> |
---|
1223 | <codeline lineno="224"><highlight class="normal"><sp/><sp/>else</highlight></codeline> |
---|
1224 | <codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/>nbytes=sizeof(in);</highlight></codeline> |
---|
1225 | <codeline lineno="226"><highlight class="normal"><sp/><sp/>end;</highlight></codeline> |
---|
1226 | </programlisting> |
---|
1227 | <location file="/home/smidl/work/git/mixpp/matlab/itsave.m"/> |
---|
1228 | </compounddef> |
---|
1229 | </doxygen> |
---|