how do I fprintf a power?
5 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Star Strider
on 22 Oct 2024
Using ‘char(178)’ is an option —
gof.rsquare = 0.975;
fprintf("R"+char(0178)+"; %.4f%s%.4f\n", gof.rsquare)
.
More Answers (0)
See Also
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!