getting a number from a text file
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!