Ich versuche, ein Etikett auf einem Pfeil zu erhalten, die sagt:Wie bekomme ich einen Ausdruck (cos (alpha)) in ein Label?
|| x || cos (alpha)
Aber ich kann nicht scheinen, damit es funktioniert.
Ich kann die ||x||
ohne Probleme schreiben, und die cos (alpha) ohne Probleme, aber ich weiß nicht, wie man sie in eine Aussage bekommt.
Irgendwelche Ideen?
Hier ist mein Code:
library(plotrix)
library(shape)
xlim <- c(-2, 6)
ylim <- c(-2, 6)
plot(0, type = "n", xlim = xlim, ylim = ylim,asp=1)
Arrows(1,1,5,1)
boxed.labels(3,1,labels="||x|| cos (a)",border=NA,xpad=1,ypad=1)
Arrows(1,2,5,2)
boxed.labels(3,2,labels=expression(cos (alpha)),border=NA,xpad=1,ypad=1)
Vielen Dank! Es funktioniert perfekt! – Martin