getting a number from a text file
古いコメントを表示
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 件のコメント
dpb
2021 年 12 月 5 日
Tariq Hammoudeh
2021 年 12 月 5 日
Jan
2021 年 12 月 5 日
dpb
2021 年 12 月 5 日
Hint to OP: Always read the "See Also" section of the documentation
Tariq Hammoudeh
2021 年 12 月 5 日
編集済み: Walter Roberson
2021 年 12 月 5 日
Star Strider
2021 年 12 月 5 日
This just keeps getting more strange !
And keep watching for more yet to come!
Walter Roberson
2021 年 12 月 5 日
filename = 'CashReserve.txt');
R = readmatrix(filename);
R = R - 1234.56;
writematrix(R, filename);
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!