Re: [Scilab-users] question on makecell

2019-12-06 Thread Samuel Gougeon

Le 06/12/2019 à 14:14, Federico Miyara a écrit :


Samuel,

Thanks, I've filed the wish as 
http://bugzilla.scilab.org/show_bug.cgi?id=16268.


Just a detail regarding the bugzilla interface: Any issue like this is 
called a "bug" and we have to accept this to complete the form. 



No, from the beginning, you can set Importance = Wish, before validating 
and creating the bugzilla entry. You can set it also afterwards.


In the old ages, there were 2 distinct websites to reports bugs on one 
hand, and to report wishes on the other hand. But it was definitely not 
handy. This is why  this "Wish" value has been created and both sites 
have been merged.


Other values of the "Importance" flag can be set according to some quite 
simple rules (that are documented in the context).


Samuel


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] question on makecell

2019-12-06 Thread Federico Miyara


Samuel,

Thanks, I've filed the wish as 
http://bugzilla.scilab.org/show_bug.cgi?id=16268.


Just a detail regarding the bugzilla interface: Any issue like this is 
called a "bug" and we have to accept this to complete the form. I think 
some of them are not really bugs but inconsistencies or other kind of 
minor details and it would be nice that we could file them as "issues", 
term that better describes what they really are. Other OS free software 
projects have an "issue tracker".


Regards,

Federico Miyara


On 05/12/2019 18:13, Samuel Gougeon wrote:

Le 05/12/2019 à 14:25, Federico Miyara a écrit :


Dear all,

When using makecell such as in

--> u = makecell([2 2], cos, 'hello', 1+%s^2, [1 2; 3 4])
 u  =

  [  1 fptr  ]  [1x1 string  ]
  [1x1 polynomial]  [2x2 constant]

we get a cell array where the unidimensional ordering of the cells 
goes first along columns and then ows. However, when extracting 
components unidimensionally, it behaves the other way around:


--> u(1:4)
 ans  =

  [  1 fptr  ]
  [1x1 polynomial]
  [1x1 string    ]
  [2x2 constant  ]

The same happens wen applying matrix:

--> matrix(u,4,1)
 ans  =

  [  1 fptr  ]
  [1x1 polynomial]
  [1x1 string    ]
  [2x2 constant  ]

--> matrix(u,1,4)
 ans  =

  [1 fptr]  [1x1 polynomial]  [1x1 string]  [2x2 constant]

Isn't this inconsistent?
Shouldn't makecell create the cell array going along rows and then 
columns?



You are right, Federico.
We could have expected to list cells elements in linearized indices 
order, as for all other native Scilab arrays.


This irregularity/exception is completely useless and misleading:

--> c = { "abcd" %T ; %pi %z}
 c  =
  [1x1 string  ]  [1x1 boolean   ]
  [1x1 constant]  [1x1 polynomial]

--> makecell([2 2], c{:}(:))
 ans  =
  [1x1 string ]  [1x1 constant  ]
  [1x1 boolean]  [1x1 polynomial]

The fact that it is documented does not attenuate it.

Please do not hesitate to report a wish about removing this exception.
It would not be complicated to remove it, and tracking and updating it 
in existing codes would be easy, through the /makecell/ keyword.


Regards
Samuel


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] question on makecell

2019-12-05 Thread Samuel Gougeon

Le 05/12/2019 à 14:25, Federico Miyara a écrit :


Dear all,

When using makecell such as in

--> u = makecell([2 2], cos, 'hello', 1+%s^2, [1 2; 3 4])
 u  =

  [  1 fptr  ]  [1x1 string  ]
  [1x1 polynomial]  [2x2 constant]

we get a cell array where the unidimensional ordering of the cells 
goes first along columns and then ows. However, when extracting 
components unidimensionally, it behaves the other way around:


--> u(1:4)
 ans  =

  [  1 fptr  ]
  [1x1 polynomial]
  [1x1 string    ]
  [2x2 constant  ]

The same happens wen applying matrix:

--> matrix(u,4,1)
 ans  =

  [  1 fptr  ]
  [1x1 polynomial]
  [1x1 string    ]
  [2x2 constant  ]

--> matrix(u,1,4)
 ans  =

  [1 fptr]  [1x1 polynomial]  [1x1 string]  [2x2 constant]

Isn't this inconsistent?
Shouldn't makecell create the cell array going along rows and then 
columns?



You are right, Federico.
We could have expected to list cells elements in linearized indices 
order, as for all other native Scilab arrays.


This irregularity/exception is completely useless and misleading:

--> c = { "abcd" %T ; %pi %z}
 c  =
  [1x1 string  ]  [1x1 boolean   ]
  [1x1 constant]  [1x1 polynomial]

--> makecell([2 2], c{:}(:))
 ans  =
  [1x1 string ]  [1x1 constant  ]
  [1x1 boolean]  [1x1 polynomial]

The fact that it is documented does not attenuate it.

Please do not hesitate to report a wish about removing this exception.
It would not be complicated to remove it, and tracking and updating it 
in existing codes would be easy, through the /makecell/ keyword.


Regards
Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] question on makecell

2019-12-05 Thread Stéphane Mottelet


Le 05/12/2019 à 14:25, Federico Miyara a écrit :


Dear all,

When using makecell such as in

--> u = makecell([2 2], cos, 'hello', 1+%s^2, [1 2; 3 4])
 u  =

  [  1 fptr  ]  [1x1 string  ]
  [1x1 polynomial]  [2x2 constant]

we get a cell array where the unidimensional ordering of the cells 
goes first along columns and then ows. However, when extracting 
components unidimensionally, it behaves the other way around:


--> u(1:4)
 ans  =

  [  1 fptr  ]
  [1x1 polynomial]
  [1x1 string    ]
  [2x2 constant  ]

The same happens wen applying matrix:

--> matrix(u,4,1)
 ans  =

  [  1 fptr  ]
  [1x1 polynomial]
  [1x1 string    ]
  [2x2 constant  ]

--> matrix(u,1,4)
 ans  =

  [1 fptr]  [1x1 polynomial]  [1x1 string]  [2x2 constant]

Isn't this inconsistent?
Shouldn't makecell create the cell array going along rows and then 
columns?


No, the doc says:

s= makecell(dims,a1,a2,...an) creates a cell array of dimensions given 
by dims with the given input arguments. The ai are stored along the last 
dimension first.





Regards,

Federico Miyara


___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users


--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users