getting a number from a text file

1 Ansicht (letzte 30 Tage)
Tariq Hammoudeh
Tariq Hammoudeh am 5 Dez. 2021
Kommentiert: Walter Roberson am 5 Dez. 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 Kommentare
Walter Roberson
Walter Roberson am 5 Dez. 2021
filename = 'CashReserve.txt');
R = readmatrix(filename);
R = R - 1234.56;
writematrix(R, filename);

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Data Import and Export finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by