[Scilab-users] Accidentally displaying huge matrices

Serge Steer Serge.Steer at inria.fr
Wed May 27 16:06:26 CEST 2015


Le 27/05/2015 14:15, Vincent COUVERT a écrit :
> Hi all,
>
> What would you think about a feature describe as follows?
>
> We coud add a specific calling sequence for lines function (e.g
> lines(-1000)) that will switch automatically the display of Scilab to
> the "short" mode [1000x1000 constant] for a matrix (or hypermatrix)
> having a dimension greater that 1000.
>
I think using lines(-1000) or a similar solution is not a good solution
because as I said lines function does not rules the display of a single
variable, but the display of all output generated by an instruction

In my opinion it should be better to extend the format function adding
an optional argument or modifying the function to allow syntax like
format("type","v","digits",10,"max_lines",100)
format("max_lines",100)

Serge
> Regards.
>
> Le 27/05/2015 11:02, Serge Steer a écrit :
>> Le 27/05/2015 10:46, Samuel Gougeon a écrit :
>>> Le 27/05/2015 10:06, Lamy Alain a écrit :
>>>> Maybe define a second function  ?
>>>>
>>>> disp => displays in the "julia" way (for instance)
>>>> disp_all =>  display all elements whatever the size (it's the user
>>>> responsibility to limit the size to something reasonable)
>>> I guess that Serge was wondering about the default display, when an
>>> instruction is not followed by ";".
>>> disp() is something else. When we use disp(), the output is
>>> intentional and required. So there should not have any abstract with
>>> disp().
>>>
>>> For the default output, i rather agree with Serge. But the limit
>>> between a full display and an abstract should be tunable (in addition
>>> to a switch to an non-wrapped mode).
>>> For instance, a max number of lines set through lines() <0 could mean
>>> that an abstract is preferred for taller output. If it is >0, the
>>> pagging mode is preferred. And if it is 0, no limit would be set (as
>>> it is presently).
>>>
>> Just take care that lines() does not rule olny the display of a
>> variable, it also rules the display of all outputs generated by an
>> intruction as in the following example:
>>
>> lines(10)
>> for i=1:20,i,end
>>
>>
>> Serge
>>> Samuel
>>>
>>> _______________________________________________
>>> users mailing list
>>> users at lists.scilab.org
>>> http://lists.scilab.org/mailman/listinfo/users
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users




More information about the users mailing list