Effacer les filtres
Effacer les filtres

getting a number from a text file

2 vues (au cours des 30 derniers jours)
Tariq Hammoudeh
Tariq Hammoudeh le 5 Déc 2021
Commenté : Walter Roberson le 5 Déc 2021
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
Star Strider
Star Strider le 5 Déc 2021
Walter Roberson
Walter Roberson le 5 Déc 2021
filename = 'CashReserve.txt');
R = readmatrix(filename);
R = R - 1234.56;
writematrix(R, filename);

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Data Import and Export dans Help Center et File Exchange

Tags

Produits


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by