Create a file which stores on each line a letter, a space, and a real number.
For example, it might look like this: e 5.4 f 3.3 c 2.2
Write a script that uses textscan to read from this file.
It will print the sum of the numbers in the file.
The script should error-check the file open and close, and print error messages as necessary.
The below-mentioned code creates a script that stores