MATLAB Answers

How can we do for following fprintf formating

1 view (last 30 days)
PULAK Kumer
PULAK Kumer on 27 Nov 2020
Commented: Star Strider on 27 Nov 2020
How can i show power 2 of x in fprintf as general format?

  4 Comments

Show 1 older comment
PULAK Kumer
PULAK Kumer on 27 Nov 2020
Please tell sir..I want to see 2 as a superscript of x using fprintf

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 27 Nov 2020
Try this:
fprintf('\tx%c\n', char(178))
producinig:
x²
.

  2 Comments

Star Strider
Star Strider on 27 Nov 2020
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!