nameGen - % % This function has two outputs. The first...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% 9/16/2009 3:11 PM % Function Name: nameGen % Input: 1. cell array containing first and last names % 2. vector specifying which first and last name % Output: 1. char vector - a new name % 2. char vector - a new T-square login % % Function Description: % This function takes in a cell array that is in this format: % % { {firstname1, firstname2, . ..} , {lastname1, lastname2, . ..} } % % It then uses the indices stored in the vector to choose a first name % and last name. The first element of the vector is the index for the % first name, and the second one is the index of the last name. For % instance, [3 4] would be the third first name and 4th last name.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % % This function has two outputs. The first output is a string containing % the first name and last name, seperated by a space, in that order. The % second output is a T-square username for that person. The username % should contain the first letter of the person's first name and all of % the letters of the person's last name, followed by a 3. All letters % should be lower case. % function [name uid] = nameGen(names, i) name = [names{1}{i(1)} ' ' names{2}{i(2)}]; uid = lower([name(1), names{2}{i(2)}, '3']);...
View Full Document

This note was uploaded on 10/22/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.

Ask a homework question - tutors are online