Where is different

The different code can draw a the same figure, but  the results are different in some case.

(a) Simple code

annotation(figure,'textbox',...
[0.1 0.6 0.4 0.2],...
'String','Ex=−0.3 × 10^{−3}',...
'EdgeColor','none',...
'FitBoxToText','off');

(b)complex code

annotation(figure,'textbox',...
[0.1 0.6 0.4 0.2],...
'String',['Ex=',num2eng(-0.3,struct('useMinus',1,'sigFigs',1,'fracMant',1)),' × 10^{',num2eng(-3,struct('useMinus',1,'sigFigs',1,'fracMant',0)),'}'],...
'EdgeColor','none',...
'FitBoxToText','off');

Leave a Reply

Your email address will not be published. Required fields are marked *