format long does not work in a function
8 次查看(过去 30 天)
显示 更早的评论
i have a function and i need the calculation in long format , i added :
origFormat = get(0, 'format');
format('long');
% -- Work in long format --
set(0,'format', origFormat);
at first line but it doesnt work
1 个评论
回答(1 个)
Steven Lord
2018-11-27
The format function changes how double and single precision numbers are displayed. It has no impact on how computations are performed with those numbers, nor will it affect how sym expressions are displayed. To affect how sym expressions are displayed call vpa on the expressions.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!