Using Display function in an easy way

2 views (last 30 days)
I want to print name and value of a variable like "S" as below during the run:
S = 0.15
Can you help me with this please

Accepted Answer

Ameer Hamza
Ameer Hamza on 24 Sep 2020
Edited: Ameer Hamza on 24 Sep 2020
S = 0.15;
fprintf('S = %.2f\n', S)

More Answers (1)

madhan ravi
madhan ravi on 24 Sep 2020
Use fprintf()

Categories

Find more on Simulink in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!