Text3D Invalid use of operator
Mostrar comentarios más antiguos
Hi,
I'm pretty new to Matlab so I'm not very familiar with the syntax. I want to plot an Arrow with Text annotated in 3D, so I thought Text3D would be a good option. I red the documentation on https://www.mathworks.com/help/symbolic/mupad_ref/textorientation.html
If I just create a new script and copy for example, "Example 1"
p1 := plot::Point3d([1, 2, 3], PointSize = 3*unit::mm):
text1 := plot::Text3d("Hello world!", [1, 2, 3],
TextOrientation = [cos(a), sin(a), 0, 0, 0, 1],
a = 0..2*PI, TextFont = [24],
Billboarding = FALSE):
p2 := plot::Point3d([3, 6, 9], PointSize = 3*unit::mm):
text2 := plot::Text3d("MuPAD", [3, 6, 9],
TextOrientation = [1, 0, 0, 0, sin(a), cos(a)],
a = 0..2*PI, TextFont = [24],
Billboarding = FALSE):
plot(p1, text1, p2, text2)
I get a "Invalid use of operator" error. Aren't the examples working stand alone code? How can I make it work?
1 comentario
KSSV
el 3 de Mayo de 2019
X = rand(2,1) ;
Y = rand(2,1) ;
annotation('arrow',X,Y);
Respuestas (1)
Steven Lord
el 3 de Mayo de 2019
0 votos
This function cannot be used directly in a MATLAB script, function, or class. It can only be used in a MuPAD Notebook or by evaluating it in a MuPAD symengine.
Instead, use annotation with the 'arrow' or 'textarrow' annotation type as KSSV suggested.
1 comentario
Sebastian Thoma
el 27 de Mayo de 2019
Is there any way to get some sort of perspective text orientation in MATLAB scripts as Text3D and Billboarding do?
Categorías
Más información sobre Annotation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!