func3 - % % function [y] = func3(x) % disp('Hello WOrld!')...

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

View Full Document Right Arrow Icon
% These comments get printed out to the screen when you type: % DO NOT USE BLOCK COMMENT FOR THIS % % help func2 % % This function TAKE ONE input and does not have % any outputs. All it does is print 'Hello WOrld!', and % displays the value of the input parameter/argument x % % function OUTPUT = nameFunc(INPUT) % In the NOON lecture, I had created this function
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % % function [y] = func3(x) % disp('Hello WOrld!') % disp(x) % y = x; % IT DID NOT WORK! Why? Because when you call func3 with a single % input parameter, it does not know what to do with the display % commands function [y] = func3(x) % disp('Hello WOrld!') % disp(x) y = x; % Now call the function: % func3(5) % % ans = % % 5...
View Full Document

This note was uploaded on 03/30/2011 for the course ENGINEERIN 127 taught by Professor Finch during the Spring '08 term at Rutgers.

Ask a homework question - tutors are online