No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

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

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.

Comment only
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