Hello,

I think I need help to solve this problem. It is very basic, but this is the first time I wish to run an octave script from gretl.
To learn this I created this very simple example based on Users' manual:

open data9-7
matrix xy = { PRIME, UNEMP }
mwrite(xy, "xy.mat", 1)
foreign language=Octave
  xy = gretl_loadmat("xy.mat");
  x = xy(:,1);
  y = xy(:,2);
  h = sum(x.*y);
  gretl_export(h, "h.mat");
end foreign



When I try to run this from gretl, I got an error message,  this one:

gretl version 2019c
Current session: 2019-07-13 11:39

? open data9-7

Read datafile D:\Programok\gretl\data\ramanathan\data9-7.gdt
periodicity: 4, maxobs: 64
observations range: 1975:1 to 1990:4

Listing 12 variables:
  0) const     1) QNC       2) PRICE     3) INCOME    4) PRIME  
  5) UNEMP     6) STOCK     7) POP       8) WINTER    9) SPRING  
 10) SUMMER   11) FALL    

? matrix xy = { PRIME, UNEMP }
Generated matrix xy
? mwrite(xy, "xy.mat", 1)
? foreign language=Octave
?   xy = gretl_loadmat("xy.mat");
?   x = xy(:,1);
?   y = xy(:,2);
?   h = sum(x.*y);
?   gretl_export(h, "h.mat");
? end foreign
error: writing file 'C:\Users\MAJOR KLÁRA\.octave_hist': No such file or directory
error: ignoring const execution_exception& while preparing to exit


I checked, the .octave_hist file is there. Also, when octave is running in gui mode, it is possible to run gretltmp.m in this directory.
So it seems like the script should work unless this problem remains unsolved.
So I am anaware, the problem is with gretl or with octave?
Is it possible that the problem is with the path (it has space and an accented character in it)?
When I set preferences in gretl and define where octave executable is located, which file should I choose?
octave-cli.exe
octave-cli-5.1.0.exe
Or one of the bat files?
(These are in the bin library of octave. The vbs files in octave root definitely do not work.)

And finally, I have not found any documentation on these technical details, this is why I need your help.

Thank you in advance,

Klára