about function rats and how to output to .txt
2 次查看(过去 30 天)
显示 更早的评论
In Figure 1, I want to express the number of numbers in my file (test1.txt) plus pi
For example: -1.17809724509617 convert to -3/8*pi
The problem I am having now is that I have a large space after using rats.
Causes me to output to txt when there is a comma in front like Figure 2
what should I do?
0 个评论
采纳的回答
Adam Danz
2019-11-11
a1 = strtrim(rats(a/pi));
Use strtrim() to remove leading and trailing white space.
2 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!