using the eval command in a loop
2 次查看(过去 30 天)
显示 更早的评论
Hi...
this line is working in my for loop...
eval(['m_text(-75,52,{' num2str(k+1992) '})'])
great...but I want to set the fontsize. How do I add this code (i,e,... 'Fontsize',12) to my eval line??
Thanks!
0 个评论
回答(1 个)
Sean de Wolski
2014-2-5
Why use eval and not just call it normally?
m_text(-75,52,num2str(k+1992),'FontSize',12)
eval is evil.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!