Pass the text of fprintf to the plot's text
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Would it be possible to pass the text of fprintf to the plot's text?
x = rand(1,10);
plot(x)
m = mean(x);
sd = std(x);
a = fprintf('the mean is %1.2f\n',m);
b = fprintf('the standard deviation is %1.2f\n',sd);
text(2,0.5,[a b])
0 Commenti
Risposta accettata
Dyuman Joshi
il 12 Dic 2023
x = rand(1,10);
plot(x)
m = mean(x);
sd = std(x);
a = sprintf('the mean is %1.2f\n',m);
disp(a)
b = sprintf('the standard deviation is %1.2f\n',sd);
disp(b)
text(2,0.5,[a b])
1 Commento
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Labels and Annotations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!