No BSD License  

3.0

3.0 | 2 ratings Rate this file 9 Downloads (last 30 days) File Size: 1020 Bytes File ID: #3690

Getusername

by

 

07 Jul 2003 (Updated )

Fetches the current user name.

| Watch this File

File Information
Description

PURPOSE:
This MATLAB mex function fetches the name of the current user. The function is only for windows operating system. It was tested for MATLAB release 12.1 running under windows 12.1

COMPILE AND LINK AS A MATLAB MEX DLL:

type
mex getusername.c

on MATLAB command prompt to compile and link the program as a MATLAB mex dll.

CALLING SYNTAX
The resulting file getusername.dll may be called just like a MATLAB m-file function with syntax:

[username] = getusername

without any input arguments.

Acknowledgements

This file inspired Get User Name.

MATLAB release MATLAB 6.1 (R12.1)
Other requirements windows
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
30 Mar 2010 David Verrelli

I want to rate Martin Lechner's alternative as 5/5.

30 Jul 2003 michael twardak

Under unix getenv('USER'); also works, string is casesensitive

10 Jul 2003 Martin Lechner

Matlab 6.5 for windows operating system:
getenv('UserName') also works

Contact us