필터 지우기
필터 지우기

about function rats and how to output to .txt

조회 수: 2 (최근 30일)
han han
han han 2019년 11월 11일
편집: Adam Danz 2019년 11월 11일
In Figure 1, I want to express the number of numbers in my file (test1.txt) plus pi
擷取.JPG
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
72714257_2227369354035516_2028957041850056704_n.jpg
what should I do?

채택된 답변

Adam Danz
Adam Danz 2019년 11월 11일
a1 = strtrim(rats(a/pi));
Use strtrim() to remove leading and trailing white space.
  댓글 수: 2
han han
han han 2019년 11월 11일
Thank you so much!
Adam Danz
Adam Danz 2019년 11월 11일
편집: Adam Danz 2019년 11월 11일
Glad I could help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by