I have two variables like A and B, now I need to print in command window variable1-comment-variable2 how can I do this?

 Akzeptierte Antwort

Thorsten
Thorsten am 28 Okt. 2015

0 Stimmen

If A and B are numbers, you can use
disp([num2str(A) ' my comment in between ' num2str(B)])

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by