[Scilab-users] Native managed Hypermatrices affect the Matplot functionality?

Tan Chin Luh chinluh at tritytech.com
Sat Mar 11 12:59:44 CET 2017


Hi,

A few questions regarding this:

1. As we know the Matplot will create new children if we call it without 
closing the previous one. So the following code will produce different 
behavior for 5.5.2 and 6.

for  cnt  =  1:n
     a  =  rand(480,640,3);
     Matplot(a);
end

if n about 100

Scilab 5.5.2 : Memory shown in task manager will goes up to above 1 G, 
and clear after closing windows

Scilab 6 : Memory shown in task manager will goes up a certain level 
(less tan 1 G), and show message "Can not allocate 7.37 MB memory."  
(7.37 varies for every run). Figure could not be closed with the "x" 
button on upper right, but able to closed by xdel.

if n is big...

Scilab 5.5.2 : Run until the critical error message shown

Scilab 6 : Crash and close


2.  To solve this in Scilab 5.5.2, we usually assign the data directly 
into the Matplot children data. However, in Scilab 6, when we run:

a  =  uint8(zeros(480,640,3));
a(:,:,1)  =  uint8(255);
a(:,:,2)  =  uint8(180);
a(:,:,3)  =  uint8(60);
Matplot(a);
// View the image first before running following lines
h  =  gcf();
h.children.children.data  =  a;

Even we assigned back the same variable, the orientation of the data is 
wrong and the image is wrongly plot on the figure. The above example 
will show orange color in the first plot, and after assigning the same 
data back into the Matplot children data, the 3 layers are arrange in 
wrong order resulting wrong display.

Thanks.

Regards,
Chin Luh


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170311/2a67e0f1/attachment.htm>


More information about the users mailing list