Question: 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

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.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!