<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello Mehran,<br>
      <br>
      Le 05/08/2014 08:35, A Khorshidi a écrit :<br>
    </div>
    <blockquote cite="mid:DUB109-W49A135947BE9B2BE982F5CA3E30@phx.gbl"
      type="cite">
      <div dir="ltr">
        <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
        <div dir="ltr">Hi; <br>
          <br>
          One reason for using integer type is to save memory space,
          isn't it? <br>
          However, whos() gives us 24 bytes as storage space for both
          integer and double data types.<br>
        </div>
      </div>
    </blockquote>
    <br>
    A scalar number is considered as a 1x1 matrix. For any matrix, some
    room is needed to record the number of rows, of columns, the type of
    the matrix, etc.<br>
    If you do the same test for a large matrix, the memory used becomes
    asymptotically proportionnal to the matrix size:<br>
    <br>
    -->var1 = int8(rand(1000,1000)*64); // 1 byte integer
    representation <br>
    -->whos -name var1<br>
    Name                     Type           Size           Bytes       
    <br>
     <br>
    var1                     int8           1000 by 1000   1000024     
    <br>
    <br>
    The way how Scilab stores variables in memory is described here:<br>
    <a class="moz-txt-link-freetext" href="http://wiki.scilab.org/Memory%20representation%20of%20variables">http://wiki.scilab.org/Memory%20representation%20of%20variables</a><br>
    <br>
    Best regards<br>
    Samuel<br>
  </body>
</html>