[Scilab-users] question to surf()
P M
p.muehlmann at gmail.com
Tue Jan 4 09:29:15 CET 2022
Dear,
is there a limitation for surf(), when displaying big matrices?
Background:
Imagine an image of size 900 x 1500.
Scilab crashes, when I try to display the image using surf().
- I know there is imshow, Matplot etc...
- for some cases it is nice to use surf() and take the pixel values as
Z-coordinate
- especially when the image contains 16 bit information and not 0-255 pixel
values
Now ... trying to display the image, Scilab closes unexpectedly.
Since I can not share the image itself, please see the code below.
Scilab does not close with this example, but the figure remains pure white.
When choosing smaller values for width/height the code works as
expected...e.g.: width = 900, height = 700
Scilab 6.1.0
Win 10
width = 900;height = 1500;
x = linspace(1,width,width)y = linspace(1,height, height);
for i = 1:width
for j = 1:height
z(i,j) = x(i)+y(j)
endend
//// normalization if necessary//zMin = min(z);//z = z - zMin;//zMax =
max(z);//z = z .* 255 ./ zMax;
f = figure();f.background = 256;f.color_map =
hotcolormap(256);surf(x,y,z');e = gce();e.thickness = 0
printf("Reached end of code\n");
Thank you
Philipp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20220104/1a7a8da0/attachment.htm>
More information about the users
mailing list