Please answer all the part by using MATLAB code 1) Read the documentation for th
ID: 3567622 • Letter: P
Question
Please answer all the part by using MATLAB code
1) Read the documentation for the functional forms given below and write a Wet description (2-3 sentences) for each one. Each description should discuss parameters, return values (if any), and where the function might be used. a) TF = Strcmp(s1,s2) http://www.mathworks.com/help/matlab/ref/strcmp.html b) f = foopen(filenamesermission) http://www.mathworks.com/help/matlab/ref/fopen.html c) L = rand http://www.mathworks.com/help/matlab/ref/rand.html d) fprintf(fileID,formatSpec,A1,...,An) http://www.mathworks.com/help/matlab/ref/fprintlhtml e) fclose(fileIQ) http://www.mathworks.com/help/matlab/refficlose.htmlExplanation / Answer
a) strcmp : compares 2 strings
return value: 1 , if both s1 and s2 are equal
else returns 0.
b)fopen: opens a particular file with filename and permission can be "r" for read only, "w" for write only
fileId is the integer file identifier
c)rand creates a random value
d) f printf: prints a particular stament to the file associated with file identifier fileId
e)fclose:
closes the file. for any further processing of the file, have to open the file again using "fopen" command