SUNY Geneseo Department of Mathematics
Friday, February 20
Math 230 02
Spring 2015
Prof. Doug Baldwin
funcdemo
function:function [] = funcdemo( msg )
fprintf( 'Your message is "%s"\n', msg );
end
>> funcdemo( 'Hello!' )
Your message is "Hello!"
>> M = 'This is some text';
>> funcdemo( M )
Your message is "This is some text"
>> funcdemo( [ 'Hello! ', M ] )
Your message is "Hello! This is some text"
>> funcdemo
{Error using funcdemo (line 2)
Not enough input arguments.
}