![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/8814545_1522129593835_DEF.jpg)
Kapil Dhanwani
Followers: 0 Following: 0
Statistics
1 Question
0 Answers
RANK
271,943
of 292,756
REPUTATION
0
CONTRIBUTIONS
1 Question
0 Answers
ANSWER ACCEPTANCE
0.0%
VOTES RECEIVED
0
RANK
of 19,936
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
RANK
of 147,931
CONTRIBUTIONS
0 Problems
0 Solutions
SCORE
0
NUMBER OF BADGES
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Feeds
Question
Write a function called digit_counter that takes the name of a text file as input and returns the number of digits (i.e., any of the characters, 0-to-9) that the file contains. If there is a problem opening the file, the function returns -1
function[c]=digit_counter(filename) fid=fopen(filename,'rt'); if fid<0 error('error opening file %s', filename); ...
8 years ago | 2 answers | 0