Change the function stars from Section 103 to the function p
Change the function stars (from Section 10.3 to the function pretty so that it will draw a line of any specified character. The character used must be passed as an additional input (string) argument, for example, pretty (6, * $\') should draw six dollar symbols.
Solution
function pretty(n,ch)
for m=1:n
disp(ch)
end
end
>> pretty(6,\'$\')
$
$
$
$
$
$
>>
