h5writemode =========== ```{function} h5writemode(filename, x, y, Vx, Vy) ``` Full definition: ```{code-block} matlab h5writemode(filename, x, y, Vx, Vy) ``` Write a 2-D mode field profile to an HDF5 file for use with AddWaveGuidePort ('E_WG_file' / 'H_WG_file'). Parameters ---------- filename : output file path (overwritten if it exists) x, y : coordinate vectors of length nx and ny Vx, Vy : field component matrices (nx-by-ny), where Vx(i,j) is the field value at coordinate (x(i), y(j)) HDF5 layout written: /x 1-D dataset, length nx /y 1-D dataset, length ny /Vx 2-D dataset, shape nx x ny /Vy 2-D dataset, shape nx x ny root attribute Version = 1.0 On Octave the oct-file h5writemode_octave (compiled by setup.m) is used. On Matlab the built-in h5create / h5write / h5writeatt are used. See also AddWaveGuidePort, setup