in y axis i want 10^(-2000). can anyone plz help
Mostra commenti meno recenti
set(gca, 'YScale', 'log')
ylim ([0 1e-308])
Instead of 1e-308 i want 1e-2000. how can i set the limit plz
Risposta accettata
Più risposte (1)
Walter Roberson
il 21 Mag 2024
0 voti
1e-2000 would underflow to 0. You can only use such a number symbolically... but symbolic numbers cannot be used as limits.
You also cannot plot() such small numbers. I am not sure it is possible to fplot() them either.
Your best bet would be to rescale your numbers to something like 0 to 100 and then change your ytick labels to lie about the range.
3 Commenti
Kasmita Devi
il 21 Mag 2024
Kasmita Devi
il 21 Mag 2024
You can show the text "1e-2000" on the axes.
plot(1, 1, 'o')
xticks(1)
xticklabels('1e-2000')
But as Walter stated, you cannot represent 1e-2000 as a double precision number. It underflows to 0. If you can't represent it as a double precision number, you can't plot it.
x = 1e-2000 % underflow
x == 0 % x is exactly, down to the last bit, zero
figure
h = plot(x, 1, '+');
h.XData % exactly zero
Categorie
Scopri di più su Argument Definitions in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


