% Example of hysyslib usage. Matlab printout. % Create a connection to Hysys. » hysys = hyconnect; % Stop the solver. » hyhold(hysys); % Create a connection to a spreadsheet. » spread = hyspread(hysys, 'Name of spreadsheet'); % Connect to the cells A1, A2 og A3 in the spreadsheet. » cells = hycell(spread, {'A1', 'A2', 'A3'}); % Read the values of the cells. » hyvalue(cells) ans = 1.0e+004 * 0.0000 4.1444 0.7314 % Change the value of cell A1 to 0.10. » hyset(cells{1}, 0.10); % Start solving. » hystart(hysys); % Check if the solver is running. » hyissolving(hysys) ans = 0 % Read new values of the cells » hyvalue(cells) ans = 1.0e+004 * 0.0000 4.3882 0.4876 % Check the units of the cells. » hyunits(celler) ans = '' 'kgmole/h' 'kgmole/h' % Release the connection to Hysys » release(hysys);