title: how to export mat file in excel sheet
body: <pre><code>Z= magic(4)
  
  Z =
  
   16     2     3    13
    5    11    10     8
    9     7     6    12
    4    14    15     1
  
  &gt;&gt; W= sign(Z)== -1
  
  W =
  
   0     0     0     0
   0     0     0     0
   0     0     0     0
   0     0     0     0
  
  &gt;&gt; xlswrite('sample.xlsx',W)
  </code></pre>
  
  <p>Error using xlswrite (line 220)
  Invoke Error, Dispatch Exception:
  Source: Microsoft Office Excel
  Description: Microsoft Office Excel cannot access the file 'C:\Program
  Files\MATLAB\R2012a\bin\644A5000'. There are several possible reasons:</p>
  
  <p>• The file name or path does not exist.
  • The file is being used by another program.
  • The workbook you are trying to save has the same name as a currently open workbook.
  Help File: C:\Program Files\Microsoft Office\Office12\1033\XLMAIN11.CHM
  Help Context ID: 0</p>
  
  <p>i have created a excel file ('sample.xlsx') on desktop .
  how to use xlswrite function.
  how to save mat file generated by sign function in excel sheet .</p>