Remember to hand in your MATLAB codes and any program output.

- a)
- (5 pts) Write a MATLAB function that will count the number
of times that a given character appears in some input string. You should
do this using an accumulation loop. Test your function by
counting the number of times
- a)
- the letter
`'a'` - b)
- the letter
`'z'` - c)
- a space

s = 'There are many spaces in this sentence.'

- 2)
- (2 pts) Repeat Problem 1, but this time use the built in string functions to do the counting. There are several ways this can be done.
- 3)
- (1 pts) Use the
`strrep`command to replace all the spaces in the string from Problem 1 with underscores.

2018-11-14