How to format notation to use "... x 10^-5..." instead of "...e..." in this figure
조회 수: 13 (최근 30일)
이전 댓글 표시
attached figure
댓글 수: 0
채택된 답변
추가 답변 (1개)
Dyuman Joshi
2023년 5월 11일
%Random graph
syms x
fplot(jacobiP(1:4,4,4,x))
axis([-1 2 -5 5])
grid on
%Values to be displayed as the legend
arr = rand(4,1)*1e-4
out=floor(log10(arr)); %take abs() of arr in case of negative values
str = compose('%f x 10^{%d}', arr./10.^out, out)
legend(str,'Location','best')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!