Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 2nd, 2012  |  syntax: None  |  size: 0.62 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Load Multiple Functions from a Single File in Matlab [closed]
  2. ??? Error: File: /home/per/Documents/MATLAB/aliases.m Line: 6 Column: 1
  3. Function definitions are not permitted in this context.
  4.        
  5. % Prevent Octave from thinking that this
  6. % is a function file:
  7.  
  8. 1;
  9.  
  10. function y = isvariable(x)
  11. %Return non-zero if x is a function.
  12.     y = exist(x, 'var');
  13. end
  14.  
  15. function y = isfile(x)
  16. %Return non-zero if x is a function.
  17.     y = exist(x, 'file');
  18. end
  19.  
  20. function y = isdir(x)
  21. %Return non-zero if x is a function.
  22.     y = exist(x, 'dir');
  23. end
  24.  
  25. function y = isbuiltin(x)
  26. %Return non-zero if x is a function.
  27.     y = exist(x) == 5;
  28. end