Randall Ang
Followers: 0 Following: 0
Feeds
已回答
Homework: Write a function called char_counter that counts the number of a certain character in a text file.
This is my solution, u can take a look for other alternatives. function charnum = char_counter(fname,character) %fname - char ...
Homework: Write a function called char_counter that counts the number of a certain character in a text file.
This is my solution, u can take a look for other alternatives. function charnum = char_counter(fname,character) %fname - char ...
4 years 前 | 0
提问
Hi everyone, I have been trying to debug this for loop as it always retain the last value of the array even if none of the conditions meet for every element. For instance, using readings = [1 20 55 90], it will print that reading(4)>100.
for ii = 1:length(readings) if readings(ii) > 100 break; end end fprintf('First reading above 100 is at in...
4 years 前 | 1 个回答 | 0