Explain in words what the following function accomplishes (not step-by-step, but what the end result is)
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:7| Question number:7.7
All Answers
total answers (1)
dostr.m
function out = dostr(inp)
persistent str
[w, r] = strtok(inp);
str = strcat(str,w);
out = str;
end
It takes the first word of every sentence passed to it, and concatenates
it to a string.
need an explanation for this answer? contact us directly to get an explanation for this answer