No BSD License  

Highlights from
Getusername

3.0

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

Getusername

by Mohammad Ashfaq

 

07 Jul 2003 (Updated 09 Jul 2003)

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 submission has inspired the following:
getUserName
MATLAB release MATLAB 6.1 (R12.1)
Other requirements windows
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
10 Jul 2003 Martin Lechner

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

30 Jul 2003 michael twardak

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

30 Mar 2010 David Verrelli

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

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
development environment Mohammad Ashfaq 22 Oct 2008 07:04:24
username Mohammad Ashfaq 22 Oct 2008 07:04:24
user Mohammad Ashfaq 22 Oct 2008 07:04:24
name Mohammad Ashfaq 22 Oct 2008 07:04:24
utilities Mohammad Ashfaq 22 Oct 2008 07:04:24
development Mohammad Ashfaq 22 Oct 2008 07:04:24

Contact us at files@mathworks.com