getting a number from a text file
Afficher commentaires plus anciens
I have txt file with 1 number inside only, nothing else.
is there a way to get that number as a variable so that i can use an if statement on it, more specifically if an inputted number is greater than the number in the txt file.
7 commentaires
dpb
le 5 Déc 2021
Tariq Hammoudeh
le 5 Déc 2021
dpb
le 5 Déc 2021
Hint to OP: Always read the "See Also" section of the documentation
Tariq Hammoudeh
le 5 Déc 2021
Modifié(e) : Walter Roberson
le 5 Déc 2021
Star Strider
le 5 Déc 2021
This just keeps getting more strange !
And keep watching for more yet to come!
Walter Roberson
le 5 Déc 2021
filename = 'CashReserve.txt');
R = readmatrix(filename);
R = R - 1234.56;
writematrix(R, filename);
Réponses (0)
Catégories
En savoir plus sur Text Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!