How to strrep only certain strings
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a cell array with values like e-.00085 and 8.5e-4. I am trying to replace the 'e' with nothing '' in the value with the leading e, while leaving the scientific notation e alone.
x = ['e-.00085';'8.5e-4'];
strrep(x,'e','');
desired_final_ans = ['-.00085';'8.5e-4'];
Is there a way to determine in an if statement whether the cell begins with an 'e'?
댓글 수: 2
Bruno Luong
2021년 10월 18일
편집: Bruno Luong
2021년 10월 18일
The questions are not the same strickly speaking.
채택된 답변
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!