how do I fprintf a power?
조회 수: 9 (최근 30일)
이전 댓글 표시
Hi, I can't figure out how to get fprintf() to display "r^2" without the "^". I have
fprintf("R^2; %.4f%s%.4f\n", gof.rsquare)
but this displays the "^". How do I fix this?
댓글 수: 0
채택된 답변
Star Strider
2024년 10월 22일
Using ‘char(178)’ is an option —
gof.rsquare = 0.975;
fprintf("R"+char(0178)+"; %.4f%s%.4f\n", gof.rsquare)
.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!