How do I insert a variable into a graph title?

5 Ansichten (letzte 30 Tage)
matlabkid602
matlabkid602 am 20 Jul. 2017
Kommentiert: matlabkid602 am 20 Jul. 2017
Hi, I'm writing a piece of code where I want to input arguements then plot. The length of the vector that I input changes the title of the graph. I'm doing this manually just now.
How do I input into my graph title "plotting length(xvector) dipoles" where xvector length changes at the start of the code?
It just puts "length(xvector)" in the graph title.
Thanks.

Akzeptierte Antwort

KL
KL am 20 Jul. 2017
title(['plotting ' num2str(length(xvector)) ' dipoles'])

Weitere Antworten (0)

Kategorien

Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by