photo

Randall Ang


Last seen: más de 3 años hace Con actividad desde 2020

Followers: 0   Following: 0

Estadística

  • First Answer
  • Thankful Level 1

Ver insignias

Feeds

Ver por

Respondida
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 ...

más de 4 años hace | 0

Pregunta


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...

más de 4 años hace | 1 respuesta | 0

1

respuesta