[Gretl-devel] Creating an empty matrix of unknown dimensions?
Riccardo (Jack) Lucchetti
r.lucchetti at univpm.it
Mon Oct 15 02:36:02 EDT 2007
On Fri, 12 Oct 2007, Riccardo (Jack) Lucchetti wrote:
> On Fri, 12 Oct 2007, andreas.rosenblad at ltv.se wrote:
>
>> In some other software, like R or MatLab, one can create an empty matrix of
>> unknown dimension, which is useful when one wants to successively add
>> values to a matrix vector, and don't know beforehand how many values will
>> be added.
>>
>> Is it possible in gretl? If not, could such a feature be added, please?
>
> Good idea. At present,
>
> matrix a = { }
>
> results in a segfault, which is bad because not only it makes sense, but
> because even a meaningless construct shouldn't crash the program.
The above is not true anymore. In CVS, you can define empty matrices and
perform a reasonable number of tricks with them. The complete list of
dos and don'ts is in the manual, but basically empty matrices should "just
work" now.
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti at univpm.it
http://www.econ.univpm.it/lucchetti
More information about the Gretl-devel
mailing list