求教一个matlab的内存分配原理。
Mostra commenti meno recenti
1.我之前用其他语言的时候,因为对变量分配的内存空间是有限的,针对类似运算1/3*3都是无法完美恢复成1的,一般根据事先定义的位宽结果为0.9999....9。
2.matlab确可以神奇地恢复,求教matlab的内存分配机制。
3.如果matlab真的可以保留全部精度,那么建立算法模型的时候,就可以获得理论上的完美无精度损失模型,这感觉是不可思议的。
>> 1/3
ans =
0.333333333333333
>> ans*3
ans =
1
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Logical 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!